I need to use SPI in my kernel module.
It looks straight forward to call spi_* functions directly, e.g.:
....
#include <linux/spi/spi.h>
....
struct spi_device *spi;
struct spi_message msg;
....
spi_message_add_tail(&xfer, &msg);
spi_sync(spi, &msg);
....
However, how to fill up the spi_device structure (e.g. defined here)?
In other words, how to refer a particular SPI device?
Thanks for directions!