#include <linux/bitrev.h>
#include <linux/delay.h>
#include <linux/fpga/fpga-mgr.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/spi/spi.h>
#include <linux/sizes.h>
enum altera_ps_devtype { … };
struct altera_ps_data { … };
struct altera_ps_conf { … };
static struct altera_ps_data c5_data = …;
static struct altera_ps_data a10_data = …;
static const struct of_device_id of_ef_match[] = …;
MODULE_DEVICE_TABLE(of, of_ef_match);
static enum fpga_mgr_states altera_ps_state(struct fpga_manager *mgr)
{ … }
static inline void altera_ps_delay(int delay_us)
{ … }
static int altera_ps_write_init(struct fpga_manager *mgr,
struct fpga_image_info *info,
const char *buf, size_t count)
{ … }
static void rev_buf(char *buf, size_t len)
{ … }
static int altera_ps_write(struct fpga_manager *mgr, const char *buf,
size_t count)
{ … }
static int altera_ps_write_complete(struct fpga_manager *mgr,
struct fpga_image_info *info)
{ … }
static const struct fpga_manager_ops altera_ps_ops = …;
static int altera_ps_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id altera_ps_spi_ids[] = …;
MODULE_DEVICE_TABLE(spi, altera_ps_spi_ids);
static struct spi_driver altera_ps_driver = …;
module_spi_driver(…) …
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;