Skip to content

spi-transfer: Keep CS asserted during long transfers

Benjamin Berg requested to merge benzea/chunked-spi-transfer into master

Long transfers need to be split into multiple chunks because of limitations by the spidev kernel driver. If this happens, we need to make sure that the CS line remains high between the different chunks.

Add code to split the transfer into chunks, and force CS high if that is the case. Note that we could emit a 0 length read() to force CS back to low, but instead we just reset the mode.


@mincrmatt12, so … I think this might fix your CS deselect issue. I think you might need to add a zero byte read() after the ioctl that turns off SPI_CS_HIGH again. So, if it does not work, that is probably something to try first.

Also … obviously not tested beyond compiling it :-/

Merge request reports