Interface Definition

The interface definition of SPI is stored in the following file: include/linux/spi/spi.h, the primary interfaces are spi_register_driver and spi_message_init.

The macro module_spi_driver() is used to register an SPI device in a short while.

The following code block shows an example.
#define module_spi_driver(__spi_driveSPI\module_driver(__spi_driver, spi_register_driver,\spi_unregister_driver)