#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/ioport.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include <linux/types.h>
#include <linux/units.h>
#include "ocelot.h"
#define REG_DEV_CPUORG_IF_CTRL …
#define REG_DEV_CPUORG_IF_CFGSTAT …
#define CFGSTAT_IF_NUM_VCORE …
#define CFGSTAT_IF_NUM_VRAP …
#define CFGSTAT_IF_NUM_SI …
#define CFGSTAT_IF_NUM_MIIM …
#define VSC7512_DEVCPU_ORG_RES_START …
#define VSC7512_DEVCPU_ORG_RES_SIZE …
#define VSC7512_CHIP_REGS_RES_START …
#define VSC7512_CHIP_REGS_RES_SIZE …
static const struct resource vsc7512_dev_cpuorg_resource = …;
static const struct resource vsc7512_gcb_resource = …;
static int ocelot_spi_initialize(struct device *dev)
{ … }
static const struct regmap_config ocelot_spi_regmap_config = …;
static int ocelot_spi_regmap_bus_read(void *context, const void *reg, size_t reg_size,
void *val, size_t val_size)
{ … }
static int ocelot_spi_regmap_bus_write(void *context, const void *data, size_t count)
{ … }
static const struct regmap_bus ocelot_spi_regmap_bus = …;
struct regmap *ocelot_spi_init_regmap(struct device *dev, const struct resource *res)
{ … }
EXPORT_SYMBOL_NS(…);
static int ocelot_spi_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id ocelot_spi_ids[] = …;
MODULE_DEVICE_TABLE(spi, ocelot_spi_ids);
static const struct of_device_id ocelot_spi_of_match[] = …;
MODULE_DEVICE_TABLE(of, ocelot_spi_of_match);
static struct spi_driver ocelot_spi_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);