linux/drivers/spi/spi-pxa2xx.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
 * Copyright (C) 2013, 2021 Intel Corporation
 */

#ifndef SPI_PXA2XX_H
#define SPI_PXA2XX_H

#include <linux/dmaengine.h>
#include <linux/irqreturn.h>
#include <linux/types.h>
#include <linux/sizes.h>

#include <linux/pxa2xx_ssp.h>

struct device;
struct gpio_desc;

/*
 * The platform data for SSP controller devices
 * (resides in device.platform_data).
 */
struct pxa2xx_spi_controller {};

struct spi_controller;
struct spi_device;
struct spi_transfer;

struct driver_data {};

static inline u32 pxa2xx_spi_read(const struct driver_data *drv_data, u32 reg)
{}

static inline void pxa2xx_spi_write(const struct driver_data *drv_data, u32 reg, u32 val)
{}

#define DMA_ALIGNMENT

static inline int pxa25x_ssp_comp(const struct driver_data *drv_data)
{}

static inline void clear_SSCR1_bits(const struct driver_data *drv_data, u32 bits)
{}

static inline u32 read_SSSR_bits(const struct driver_data *drv_data, u32 bits)
{}

static inline void write_SSSR_CS(const struct driver_data *drv_data, u32 val)
{}

extern int pxa2xx_spi_flush(struct driver_data *drv_data);

#define MAX_DMA_LEN
#define DEFAULT_DMA_CR1

extern irqreturn_t pxa2xx_spi_dma_transfer(struct driver_data *drv_data);
extern int pxa2xx_spi_dma_prepare(struct driver_data *drv_data,
				  struct spi_transfer *xfer);
extern void pxa2xx_spi_dma_start(struct driver_data *drv_data);
extern void pxa2xx_spi_dma_stop(struct driver_data *drv_data);
extern int pxa2xx_spi_dma_setup(struct driver_data *drv_data);
extern void pxa2xx_spi_dma_release(struct driver_data *drv_data);

int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp);
void pxa2xx_spi_remove(struct device *dev);

extern const struct dev_pm_ops pxa2xx_spi_pm_ops;

#endif /* SPI_PXA2XX_H */