#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/pm_runtime.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
#define SSC_BRG …
#define SSC_TBUF …
#define SSC_RBUF …
#define SSC_CTL …
#define SSC_IEN …
#define SSC_I2C …
#define SSC_CTL_DATA_WIDTH_9 …
#define SSC_CTL_DATA_WIDTH_MSK …
#define SSC_CTL_BM …
#define SSC_CTL_HB …
#define SSC_CTL_PH …
#define SSC_CTL_PO …
#define SSC_CTL_SR …
#define SSC_CTL_MS …
#define SSC_CTL_EN …
#define SSC_CTL_LPB …
#define SSC_CTL_EN_TX_FIFO …
#define SSC_CTL_EN_RX_FIFO …
#define SSC_CTL_EN_CLST_RX …
#define SSC_IEN_TEEN …
#define FIFO_SIZE …
struct spi_st { … };
static void ssc_write_tx_fifo(struct spi_st *spi_st)
{ … }
static void ssc_read_rx_fifo(struct spi_st *spi_st)
{ … }
static int spi_st_transfer_one(struct spi_controller *host,
struct spi_device *spi, struct spi_transfer *t)
{ … }
#define MODEBITS …
static int spi_st_setup(struct spi_device *spi)
{ … }
static irqreturn_t spi_st_irq(int irq, void *dev_id)
{ … }
static int spi_st_probe(struct platform_device *pdev)
{ … }
static void spi_st_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int spi_st_runtime_suspend(struct device *dev)
{ … }
static int spi_st_runtime_resume(struct device *dev)
{ … }
#endif
#ifdef CONFIG_PM_SLEEP
static int spi_st_suspend(struct device *dev)
{ … }
static int spi_st_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops spi_st_pm = …;
static const struct of_device_id stm_spi_match[] = …;
MODULE_DEVICE_TABLE(of, stm_spi_match);
static struct platform_driver spi_st_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;