linux/drivers/mtd/devices/mchp23k256.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * mchp23k256.c
 *
 * Driver for Microchip 23k256 SPI RAM chips
 *
 * Copyright © 2016 Andrew Lunn <[email protected]>
 */
#include <linux/device.h>
#include <linux/module.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/sizes.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/of.h>

#define MAX_CMD_SIZE

struct mchp23_caps {};

struct mchp23k256_flash {};

#define MCHP23K256_CMD_WRITE_STATUS
#define MCHP23K256_CMD_WRITE
#define MCHP23K256_CMD_READ
#define MCHP23K256_MODE_SEQ

#define to_mchp23k256_flash(x)

static void mchp23k256_addr2cmd(struct mchp23k256_flash *flash,
				unsigned int addr, u8 *cmd)
{}

static int mchp23k256_cmdsz(struct mchp23k256_flash *flash)
{}

static int mchp23k256_write(struct mtd_info *mtd, loff_t to, size_t len,
			    size_t *retlen, const unsigned char *buf)
{}

static int mchp23k256_read(struct mtd_info *mtd, loff_t from, size_t len,
			   size_t *retlen, unsigned char *buf)
{}

/*
 * Set the device into sequential mode. This allows read/writes to the
 * entire SRAM in a single operation
 */
static int mchp23k256_set_mode(struct spi_device *spi)
{}

static const struct mchp23_caps mchp23k256_caps =;

static const struct mchp23_caps mchp23lcv1024_caps =;

static int mchp23k256_probe(struct spi_device *spi)
{}

static void mchp23k256_remove(struct spi_device *spi)
{}

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

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

static struct spi_driver mchp23k256_driver =;

module_spi_driver();

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