[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210629164733.GE4613@sirena.org.uk>
Date: Tue, 29 Jun 2021 17:47:33 +0100
From: Mark Brown <broonie@...nel.org>
To: Dan Sneddon <dan.sneddon@...rochip.com>
Cc: linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Tudor Ambarus <tudor.ambarus@...rochip.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Ludovic Desroches <ludovic.desroches@...rochip.com>
Subject: Re: [PATCH] spi: atmel: Fix CS and initialization bug
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists