Skip to content
Verified Commit 46f7ac3d authored by Robin Murphy's avatar Robin Murphy Committed by Mark Brown
Browse files

spi: bitbang: Fix lsb-first Rx



Shifting the recieved bit by "bits" inserts it at the top of the
*currently remaining* Tx data, so we end up accumulating the whole
transfer into bit 0 of the output word. Oops.

For the algorithm to work as intended, we need to remember where the
top of the *original* word was, and shift Rx to there.

Fixes: 1847e304 ("spi: gpio: Implement LSB First bitbang support")
Signed-off-by: Robin Murphy's avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/28324d8622da80461cce35a82859b003d6f6c4b0.1659538737.git.robin.murphy@arm.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 568035b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment