spi: bcm2835: Support spi0-0cs and SPI_NO_CS mode
authorPhil Elwell <phil@raspberrypi.com>
Mon, 8 Jan 2024 11:42:57 +0000 (11:42 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:27 +0000 (11:35 +0000)
commit87cadbf57399f50910f639d49f99a97e94484e3e
treed686e7ccf0490e7e46484fa3ff34b994dbaf4f09
parent6c3bf983a365b0edf4c422450102dfdd0c82b625
spi: bcm2835: Support spi0-0cs and SPI_NO_CS mode

The forced conversion of native CS lines into software CS lines is done
whether or not the controller has been given any CS lines to use. This
breaks the use of the spi0-0cs overlay to prevent SPI from claiming any
CS lines, particularly with spidev which doesn't pass in the SPI_NO_CS
flag at creation.

Use the presence of an empty cs-gpios property as an indication that no
CS lines should be used, bypassing the native CS conversion code.

See: https://github.com/raspberrypi/linux/issues/5835

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/spi/spi-bcm2835.c