1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Header File for Altera SPI Driver.
5 #ifndef __LINUX_SPI_ALTERA_H
6 #define __LINUX_SPI_ALTERA_H
8 #include <linux/interrupt.h>
9 #include <linux/regmap.h>
10 #include <linux/spi/spi.h>
11 #include <linux/types.h>
13 #define ALTERA_SPI_MAX_CS 32
16 * struct altera_spi_platform_data - Platform data of the Altera SPI driver
17 * @mode_bits: Mode bits of SPI host.
18 * @num_chipselect: Number of chipselects.
19 * @bits_per_word_mask: bitmask of supported bits_per_word for transfers.
20 * @num_devices: Number of devices that shall be added when the driver
22 * @devices: The devices to add.
24 struct altera_spi_platform_data
{
27 u32 bits_per_word_mask
;
29 struct spi_board_info
*devices
;
40 const unsigned char *tx
;
43 struct regmap
*regmap
;
48 extern irqreturn_t
altera_spi_irq(int irq
, void *dev
);
49 extern void altera_spi_init_host(struct spi_controller
*host
);
50 #endif /* __LINUX_SPI_ALTERA_H */