table of contents
STRUCT SPI_DEVICE(9) | Serial Peripheral Interface (S | STRUCT SPI_DEVICE(9) |
NAME¶
struct_spi_device - Master side proxy for an SPI slave device
SYNOPSIS¶
struct spi_device {
struct device dev;
struct spi_master * master;
u32 max_speed_hz;
u8 chip_select;
u8 bits_per_word;
u16 mode; #define SPI_CPHA 0x01 #define SPI_CPOL 0x02 #define SPI_MODE_0 (0|0) #define SPI_MODE_1 (0|SPI_CPHA) #define SPI_MODE_2 (SPI_CPOL|0) #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) #define SPI_CS_HIGH 0x04 #define SPI_LSB_FIRST 0x08 #define SPI_3WIRE 0x10 #define SPI_LOOP 0x20 #define SPI_NO_CS 0x40 #define SPI_READY 0x80 #define SPI_TX_DUAL 0x100 #define SPI_TX_QUAD 0x200 #define SPI_RX_DUAL 0x400 #define SPI_RX_QUAD 0x800
int irq;
void * controller_state;
void * controller_data;
char modalias[SPI_NAME_SIZE];
int cs_gpio;
struct spi_statistics statistics; };
MEMBERS¶
dev
master
max_speed_hz
chip_select
bits_per_word
mode
irq
controller_state
controller_data
modalias[SPI_NAME_SIZE]
cs_gpio
statistics
DESCRIPTION¶
A spi_device is used to interchange data between an SPI slave (usually a discrete chip) and CPU memory.
In dev, the platform_data is used to hold information about this device that's meaningful to the device's protocol driver, but not to its controller. One example might be an identifier for a chip variant with slightly different functionality; another might be information about how this particular board wires the chip's pins.
COPYRIGHT¶
January 2017 | Kernel Hackers Manual 4.8. |