Driver Development : SPI or 4 wire Interface on BBB

I am developing a driver for a hardware whose datasheet says it has a 4 wire Serial interface .DataIN/OUT,Clock,CS .Does it means I can develop a full fledged SPI driver on Linux to use it.
To add more when the CLK has n-n+1(say 3-4) rising edge with LE = 1 certain control register will be written .Value of n depends on the type of control register.
Will it be good to develop a SPI driver for this or this can be achieved better by using the GPIOs(setting/resetting the CLK,Data Lines) .

experts comments required.
Rp

Here are the possible solutions:

  1. Use spidev which allows a user space application to communicate with a device over SPI
  2. Use PRU to communicate with device over SPI
  3. Develop a device driver to communicate with device over SPI
  4. Adapt an IIO driver that is similar to your device

Regards,
John

My Question was Can CS be selectively made High or Low at nth or pth Clock Pulse while using/writing the SPI driver?

Best to use the PRU and control the I/O with software.

Regards,
John

Most SPI peripheral can control the CS automatically. The TRM will tell you if you can meet your timing diagrams. If it doesn’t you need to use a GPIO control of CLK in software

What is PRU?Can you post a link or keywords related to it.?

Just Google “am335x pru”

http://processors.wiki.ti.com/index.php/PRU-ICSS

Regards,
John