linux/drivers/fpga/ice40-spi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * FPGA Manager Driver for Lattice iCE40.
 *
 *  Copyright (c) 2016 Joel Holdsworth
 *
 * This driver adds support to the FPGA manager for configuring the SRAM of
 * Lattice iCE40 FPGAs through slave SPI.
 */

#include <linux/fpga/fpga-mgr.h>
#include <linux/gpio/consumer.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
#include <linux/stringify.h>

#define ICE40_SPI_MAX_SPEED
#define ICE40_SPI_MIN_SPEED

#define ICE40_SPI_RESET_DELAY
#define ICE40_SPI_HOUSEKEEPING_DELAY

#define ICE40_SPI_NUM_ACTIVATION_BYTES

struct ice40_fpga_priv {};

static enum fpga_mgr_states ice40_fpga_ops_state(struct fpga_manager *mgr)
{}

static int ice40_fpga_ops_write_init(struct fpga_manager *mgr,
				     struct fpga_image_info *info,
				     const char *buf, size_t count)
{}

static int ice40_fpga_ops_write(struct fpga_manager *mgr,
				const char *buf, size_t count)
{}

static int ice40_fpga_ops_write_complete(struct fpga_manager *mgr,
					 struct fpga_image_info *info)
{}

static const struct fpga_manager_ops ice40_fpga_ops =;

static int ice40_fpga_probe(struct spi_device *spi)
{}

static const struct of_device_id ice40_fpga_of_match[] =;
MODULE_DEVICE_TABLE(of, ice40_fpga_of_match);

static const struct spi_device_id ice40_fpga_spi_ids[] =;
MODULE_DEVICE_TABLE(spi, ice40_fpga_spi_ids);

static struct spi_driver ice40_fpga_driver =;

module_spi_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();