3
votes

I have written a simple driver for a character device in Non Blocking mode using epoll. Now I would like to use that driver for SPI interface.

What should be the device name or how will I map the actual device with the kernel ? How will I use the interrupt?

Also who is the Master and Slave?Suppose I am connecting a SPI compatible device to the panda board.Will that device becomes a slave and the development board becomes Master?

I am a newbie.I am using a panda board. In what way should I go through the Technical Reference manual?

I would really appreciate if anybody would explain and clarify my doubts.

2
panda board is master and your spi compatible device is slave. Can you please post the code of your driver ? - Punit Vara

2 Answers

0
votes

You probably want to connect your driver to a SPI bus driver. This requires a slight reworking of your driver. See drivers/spi/spi.c

You'll be using the commands for the bus (master, the CPU side) to read and write the commands to the unit.

I don't know what a Panda board is, but if it connects via SPI, it might be a master, but it is probably a slave.

0
votes

Go through the basics of spi here