#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/parport.h>
#include <linux/sched.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
#include <linux/spi/flash.h>
#include <linux/mtd/partitions.h>
#define butterfly_nreset …
#define spi_sck_bit …
#define spi_mosi_bit …
#define vcc_bits …
#define spi_miso_bit …
#define spi_cs_bit …
static inline struct butterfly *spidev_to_pp(struct spi_device *spi)
{ … }
struct butterfly { … };
static inline void
setsck(struct spi_device *spi, int is_on)
{ … }
static inline void
setmosi(struct spi_device *spi, int is_on)
{ … }
static inline int getmiso(struct spi_device *spi)
{ … }
static void butterfly_chipselect(struct spi_device *spi, int value)
{ … }
#define spidelay(X) …
#include "spi-bitbang-txrx.h"
static u32
butterfly_txrx_word_mode0(struct spi_device *spi, unsigned nsecs, u32 word,
u8 bits, unsigned flags)
{ … }
static struct mtd_partition partitions[] = …;
static struct flash_platform_data flash = …;
static struct butterfly *butterfly;
static void butterfly_attach(struct parport *p)
{ … }
static void butterfly_detach(struct parport *p)
{ … }
static struct parport_driver butterfly_driver = …;
module_parport_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;