I need to write an spi driver for omap4 from scratch. I am referring http://lxr.free-electrons.com/source/drivers/spi/spi-omap2-mcspi.c driver code. But, I am unable to understand how basic device operations are handled in this driver code. For example a char driver has the structure
struct file_operations scull_fops = {
.owner = THIS_MODULE,
.llseek = scull_llseek,
.read = scull_read,
.write = scull_write,
.ioctl = scull_ioctl,
.open = scull_open,
.release = scull_release,
};
containing the pointers to the basic functions like open, read, write etc...
I don't find these functions in http://lxr.free-electrons.com/source/drivers/spi/spi-omap2-mcspi.c
Somebody please help me identify how the device open, read & write are provided in the spi-omap2-mcspi.c code.
drivers/spiis a directory for master drivers, i.e. for the SPI master controllers. Are you writing a driver for the master or a slave device? - sawdust