#include <linux/slab.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand-gpio.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>
struct gpio_nand { … };
static void gpio_nand_write_commit(struct gpio_nand *priv)
{ … }
static void gpio_nand_io_write(struct gpio_nand *priv, u8 byte)
{ … }
static void gpio_nand_dir_output(struct gpio_nand *priv, u8 byte)
{ … }
static u8 gpio_nand_io_read(struct gpio_nand *priv)
{ … }
static void gpio_nand_dir_input(struct gpio_nand *priv)
{ … }
static void gpio_nand_write_buf(struct gpio_nand *priv, const u8 *buf, int len)
{ … }
static void gpio_nand_read_buf(struct gpio_nand *priv, u8 *buf, int len)
{ … }
static void gpio_nand_ctrl_cs(struct gpio_nand *priv, bool assert)
{ … }
static int gpio_nand_exec_op(struct nand_chip *this,
const struct nand_operation *op, bool check_only)
{ … }
static int gpio_nand_setup_interface(struct nand_chip *this, int csline,
const struct nand_interface_config *cf)
{ … }
static int gpio_nand_attach_chip(struct nand_chip *chip)
{ … }
static const struct nand_controller_ops gpio_nand_ops = …;
static int gpio_nand_probe(struct platform_device *pdev)
{ … }
static void gpio_nand_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id gpio_nand_of_id_table[] = …;
MODULE_DEVICE_TABLE(of, gpio_nand_of_id_table);
#endif
static const struct platform_device_id gpio_nand_plat_id_table[] = …;
MODULE_DEVICE_TABLE(platform, gpio_nand_plat_id_table);
static struct platform_driver gpio_nand_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;