mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
In order to make SPI CRC work, we had to ensure the master and the slave agree on the size of slave response. This required us to first send the response size and then send the full response. The downside of this is that we cannot take full advantage of DMA. Given the SPI bus is fast enough, let's add an option to always transfer max size packet on slave response. This incurs some overhead as unused bytes are also sent, but the overhead doesn't affect us when the slave is busy with touch scanning. (The scanning time is longer than transferring 64 bytes over SPI.) This situation may change in the future, so make it a compile time option for now. Also removed the use of RX channel on the slave side when the slave is sending response. The RX channel is useless in this case. BUG=None TEST=Build and measure scan rate w/ and w/o CONFIG_KEYBORG_SPI_FULL_PACKET flag. BRANCH=None Change-Id: I4b23b1d89903dd022b445eb81667679276858008 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/203660 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>