linux/drivers/spi/spi-st-ssc4.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Copyright (c) 2008-2014 STMicroelectronics Limited
 *
 *  Author: Angus Clark <[email protected]>
 *          Patrice Chotard <[email protected]>
 *          Lee Jones <[email protected]>
 *
 *  SPI host mode controller driver, used in STMicroelectronics devices.
 */

#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>

/* SSC registers */
#define SSC_BRG
#define SSC_TBUF
#define SSC_RBUF
#define SSC_CTL
#define SSC_IEN
#define SSC_I2C

/* SSC Control */
#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

/* SSC Interrupt Enable */
#define SSC_IEN_TEEN

#define FIFO_SIZE

struct spi_st {};

/* Load the TX FIFO */
static void ssc_write_tx_fifo(struct spi_st *spi_st)
{}

/* Read the RX FIFO */
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)
{}

/* the spi->mode bits understood by this driver: */
#define MODEBITS
static int spi_st_setup(struct spi_device *spi)
{}

/* Interrupt fired when TX shift register becomes empty */
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();