#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
#include <linux/spi/spi_oc_tiny.h>
#include <linux/io.h>
#include <linux/of.h>
#define DRV_NAME …
#define TINY_SPI_RXDATA …
#define TINY_SPI_TXDATA …
#define TINY_SPI_STATUS …
#define TINY_SPI_CONTROL …
#define TINY_SPI_BAUD …
#define TINY_SPI_STATUS_TXE …
#define TINY_SPI_STATUS_TXR …
struct tiny_spi { … };
static inline struct tiny_spi *tiny_spi_to_hw(struct spi_device *sdev)
{ … }
static unsigned int tiny_spi_baud(struct spi_device *spi, unsigned int hz)
{ … }
static int tiny_spi_setup_transfer(struct spi_device *spi,
struct spi_transfer *t)
{ … }
static int tiny_spi_setup(struct spi_device *spi)
{ … }
static inline void tiny_spi_wait_txr(struct tiny_spi *hw)
{ … }
static inline void tiny_spi_wait_txe(struct tiny_spi *hw)
{ … }
static int tiny_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
{ … }
static irqreturn_t tiny_spi_irq(int irq, void *dev)
{ … }
#ifdef CONFIG_OF
static int tiny_spi_of_probe(struct platform_device *pdev)
{ … }
#else
static int tiny_spi_of_probe(struct platform_device *pdev)
{
return 0;
}
#endif
static int tiny_spi_probe(struct platform_device *pdev)
{ … }
static void tiny_spi_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id tiny_spi_match[] = …;
MODULE_DEVICE_TABLE(of, tiny_spi_match);
#endif
static struct platform_driver tiny_spi_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;