From: Mark Brown <broonie@kernel.org>
To: Dan Sneddon <dan.sneddon@microchip.com>
Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>
Subject: Re: [PATCH] spi: atmel: Fix CS and initialization bug
Date: Tue, 29 Jun 2021 17:47:33 +0100 [thread overview]
Message-ID: <20210629164733.GE4613@sirena.org.uk> (raw)
In-Reply-To: <20210629162914.23286-1-dan.sneddon@microchip.com>
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-06-29 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 16:29 Dan Sneddon
2021-06-29 16:47 ` Mark Brown [this message]
2021-06-29 17:01 ` Dan.Sneddon
2021-06-29 17:07 ` Mark Brown
2021-06-29 17:50 ` Dan.Sneddon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210629164733.GE4613@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=dan.sneddon@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=tudor.ambarus@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®