October 2017
Intermediate to advanced
586 pages
14h 8m
English
The struct spi_device structure represents an SPI device, and is defined in include/linux/spi/spi.h:
struct spi_device {
struct devicedev;
struct spi_master*master;
u32 max_speed_hz;
u8 chip_select;
u8 bits_per_word;
u16 mode;
int irq;
[...]
int cs_gpio; /* chip select gpio */
};
Some fields that are not meaningful for us have been removed. The following are the meanings of the elements in the structure: