#include <linux/module.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#define MAX_READY_WAIT_JIFFIES …
#define SST25L_CMD_WRSR …
#define SST25L_CMD_WRDI …
#define SST25L_CMD_RDSR …
#define SST25L_CMD_WREN …
#define SST25L_CMD_READ …
#define SST25L_CMD_EWSR …
#define SST25L_CMD_SECTOR_ERASE …
#define SST25L_CMD_READ_ID …
#define SST25L_CMD_AAI_PROGRAM …
#define SST25L_STATUS_BUSY …
#define SST25L_STATUS_WREN …
#define SST25L_STATUS_BP0 …
#define SST25L_STATUS_BP1 …
struct sst25l_flash { … };
struct flash_info { … };
#define to_sst25l_flash(x) …
static struct flash_info sst25l_flash_info[] = …;
static int sst25l_status(struct sst25l_flash *flash, int *status)
{ … }
static int sst25l_write_enable(struct sst25l_flash *flash, int enable)
{ … }
static int sst25l_wait_till_ready(struct sst25l_flash *flash)
{ … }
static int sst25l_erase_sector(struct sst25l_flash *flash, uint32_t offset)
{ … }
static int sst25l_erase(struct mtd_info *mtd, struct erase_info *instr)
{ … }
static int sst25l_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, unsigned char *buf)
{ … }
static int sst25l_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const unsigned char *buf)
{ … }
static struct flash_info *sst25l_match_device(struct spi_device *spi)
{ … }
static int sst25l_probe(struct spi_device *spi)
{ … }
static void sst25l_remove(struct spi_device *spi)
{ … }
static struct spi_driver sst25l_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;