Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: rb4xx: Fix set_cs logic.

As it turns out, the set_cs() enable parameter refers to the logic level
on the CS pin, not the state of chip selection.

This broke functionality of the LEDs behind the CPLD, or at least delayed
the commands until another one came in to toggle CS.

Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bert Vermeulen and committed by
Mark Brown
4a1ae8be 05aec357

+1 -1
+1 -1
drivers/spi/spi-rb4xx.c
··· 90 90 * since it's all on the same hardware register. However the 91 91 * CPLD needs CS deselected after every command. 92 92 */ 93 - if (!enable) 93 + if (enable) 94 94 rb4xx_write(rbspi, AR71XX_SPI_REG_IOC, 95 95 AR71XX_SPI_IOC_CS0 | AR71XX_SPI_IOC_CS1); 96 96 }