[PATCH] spi: atmel: Fix CS and initialization bug

Mark Brown broonie at kernel.org
Tue Jun 29 09:47:33 PDT 2021


On Tue, Jun 29, 2021 at 09:29:14AM -0700, Dan Sneddon wrote:

> spi_setup won't get programmed into the hardware.  This patch makes
> sure the cs_activate call is made even with a gpio controlled chip
> select.

In what way does it do that?  I can't tell what the patch is supposed to
do.

> -	enable = (!!(spi->mode & SPI_CS_HIGH) == enable);
>  
> -	if (enable) {
> +	if ((enable && (spi->mode & SPI_CS_HIGH))
> +			|| (!enable && !(spi->mode & SPI_CS_HIGH))) {

This looks especially suspicious.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210629/ceed205d/attachment.sig>


More information about the linux-arm-kernel mailing list