#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/spi/spi.h>
#include "vitesse-vsc73xx.h"
#define VSC73XX_CMD_SPI_MODE_READ …
#define VSC73XX_CMD_SPI_MODE_WRITE …
#define VSC73XX_CMD_SPI_MODE_SHIFT …
#define VSC73XX_CMD_SPI_BLOCK_SHIFT …
#define VSC73XX_CMD_SPI_BLOCK_MASK …
#define VSC73XX_CMD_SPI_SUBBLOCK_MASK …
struct vsc73xx_spi { … };
static const struct vsc73xx_ops vsc73xx_spi_ops;
static u8 vsc73xx_make_addr(u8 mode, u8 block, u8 subblock)
{ … }
static int vsc73xx_spi_read(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
u32 *val)
{ … }
static int vsc73xx_spi_write(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
u32 val)
{ … }
static int vsc73xx_spi_probe(struct spi_device *spi)
{ … }
static void vsc73xx_spi_remove(struct spi_device *spi)
{ … }
static void vsc73xx_spi_shutdown(struct spi_device *spi)
{ … }
static const struct vsc73xx_ops vsc73xx_spi_ops = …;
static const struct of_device_id vsc73xx_of_match[] = …;
MODULE_DEVICE_TABLE(of, vsc73xx_of_match);
static const struct spi_device_id vsc73xx_spi_ids[] = …;
MODULE_DEVICE_TABLE(spi, vsc73xx_spi_ids);
static struct spi_driver vsc73xx_spi_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;