linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Trent Piepho <tpiepho@impinj.com>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"phil@raspberrypi.org" <phil@raspberrypi.org>
Subject: Re: [PATCH] spi: Make GPIO CSs honour the SPI_NO_CS flag
Date: Wed, 17 Oct 2018 10:42:08 +0100	[thread overview]
Message-ID: <20181017094208.GA24097@sirena.org.uk> (raw)
In-Reply-To: <1539718160.30311.10.camel@impinj.com>

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

On Tue, Oct 16, 2018 at 07:29:21PM +0000, Trent Piepho wrote:
> On Tue, 2018-10-16 at 10:03 +0100, Mark Brown wrote:
> > On Mon, Oct 15, 2018 at 06:34:18PM +0000, Trent Piepho wrote:

> > > I imagine it depends on what set_cs needs to do, which might not be
> > > solely related to changing the CS line.

> > It should be.  If something is hanging other work on set_cs() then it's
> > going to break.

> IIRC, for spi-dw setting CS is the only way to trigger the master to do
> anything.  I think orion is the same way.  Even if you don't want a CS
> line the driver still needs to assert one.  Which CS to use as the
> dummy CS is a challenge that has come up before.

> bcm2835_spi_set_cs() does check SPI_NO_CS, but it still does a lot of
> other stuff even if that is set, likely because of the above issue.

For hardware that's that broken I'd recommend deferring the actual CS
setting operation to the transfer operation instead; that way we can
guarantee it happens for any pattern of access to the chip select (or
error out if we can't represent it properly, though obviously a lot of
such systems use a GPIO for the chip select to work around the broken
hardware).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

      reply	other threads:[~2018-10-17  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12  9:23 [PATCH] spi: Make GPIO CSs honour the SPI_NO_CS flag Phil Elwell
2018-10-12 17:03 ` Applied "spi: Make GPIO CSs honour the SPI_NO_CS flag" to the spi tree Mark Brown
2018-10-15 18:34 ` [PATCH] spi: Make GPIO CSs honour the SPI_NO_CS flag Trent Piepho
2018-10-16  9:03   ` Mark Brown
2018-10-16 19:29     ` Trent Piepho
2018-10-17  9:42       ` Mark Brown [this message]

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=20181017094208.GA24097@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=phil@raspberrypi.org \
    --cc=tpiepho@impinj.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;
as well as URLs for NNTP newsgroup(s).