I want to control chipselect for my spidevice from user space. i am using imax25 board.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I want to control chipselect for my spidevice from user space. i am using imax25 board.

783 次查看
priti1z
Contributor II

I have a requirement for control chipselect for my spidevice.

The requirement is between two writes or reads my device should remain selected from contoller.

For example the sequence is  like :

 

Write opreation

 

1)chip select

2)send some data ( i am using ioctl(SPI_IOC_MESSAGE(1) )

3)send some more data ( means sending one more time ioctl command).

4)chip deselect

 

Now after Write operation i need to read the data.

 

Read Operation

1)chip select

2)Read data ( i am using ioctl(SPI_IOC_MESSAGE(1) )

3)Read more data ( means sending one more time ioctl command).

4)chip deselect

 

but as per my understanding whenever we call ioctl(SPI_IOC_MESSAGE(1)) the control finally goes to mxc_spi.c (which is controller driver) and for each write/read it selects the chip -> enables the clock -> write/read data then deselects the chip.

Note : i saw it wrtites to the control register which actually has the value for chip select and all.

 

Is there any way i can meet the above requirement?

i am really stuck.

 

标记 (2)
0 项奖励
回复
0 回复数