提交 4a1ae8be 编写于 作者: B Bert Vermeulen 提交者: Mark Brown

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: NBert Vermeulen <bert@biot.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 05aec357
...@@ -90,7 +90,7 @@ static void rb4xx_set_cs(struct spi_device *spi, bool enable) ...@@ -90,7 +90,7 @@ static void rb4xx_set_cs(struct spi_device *spi, bool enable)
* since it's all on the same hardware register. However the * since it's all on the same hardware register. However the
* CPLD needs CS deselected after every command. * CPLD needs CS deselected after every command.
*/ */
if (!enable) if (enable)
rb4xx_write(rbspi, AR71XX_SPI_REG_IOC, rb4xx_write(rbspi, AR71XX_SPI_REG_IOC,
AR71XX_SPI_IOC_CS0 | AR71XX_SPI_IOC_CS1); AR71XX_SPI_IOC_CS0 | AR71XX_SPI_IOC_CS1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册