linux/drivers/net/dsa/vitesse-vsc73xx-spi.c

// SPDX-License-Identifier: GPL-2.0
/* DSA driver for:
 * Vitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch
 * Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch
 * Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch
 * Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch
 *
 * This driver takes control of the switch chip over SPI and
 * configures it to route packages around when connected to a CPU port.
 *
 * Copyright (C) 2018 Linus Wallej <[email protected]>
 * Includes portions of code from the firmware uploader by:
 * Copyright (C) 2009 Gabor Juhos <[email protected]>
 */
#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 - VSC73xx SPI state container
 */
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();