October 2017
Intermediate to advanced
586 pages
14h 8m
English
Devices should be instantiated in board files only if the system does not support the DT. Since the DT has come along, this method of instantiating is deprecated. Therefore, let's just remember that the board file resides in the arch/ directory. The structure used to represent an SPI device is struct spi_board_info, not the struct spi_device we used in the driver. It is only when you have filled and registered the struct spi_board_info using the spi_register_board_info function that the kernel will build a struct spi_device (which will be passed to your driver and register with the SPI core).
Feel free to look at the struct spi_board_info field in include/linux/spi/spi.h ...