mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 16:48:38 -04:00
spi: altera: separate core code from platform code
In preparation of adding support for a new bus type, separate the core spi-altera code from the platform driver code. Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Link: https://lore.kernel.org/r/20210416165720.554144-2-matthew.gerlach@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
1b8a7d4282
commit
b0c3d9354d
@@ -5,10 +5,13 @@
|
||||
#ifndef __LINUX_SPI_ALTERA_H
|
||||
#define __LINUX_SPI_ALTERA_H
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define ALTERA_SPI_MAX_CS 32
|
||||
|
||||
/**
|
||||
* struct altera_spi_platform_data - Platform data of the Altera SPI driver
|
||||
* @mode_bits: Mode bits of SPI master.
|
||||
@@ -26,4 +29,22 @@ struct altera_spi_platform_data {
|
||||
struct spi_board_info *devices;
|
||||
};
|
||||
|
||||
struct altera_spi {
|
||||
int irq;
|
||||
int len;
|
||||
int count;
|
||||
int bytes_per_word;
|
||||
u32 imr;
|
||||
|
||||
/* data buffers */
|
||||
const unsigned char *tx;
|
||||
unsigned char *rx;
|
||||
|
||||
struct regmap *regmap;
|
||||
u32 regoff;
|
||||
struct device *dev;
|
||||
};
|
||||
|
||||
extern irqreturn_t altera_spi_irq(int irq, void *dev);
|
||||
extern void altera_spi_init_master(struct spi_master *master);
|
||||
#endif /* __LINUX_SPI_ALTERA_H */
|
||||
|
||||
Reference in New Issue
Block a user