linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Phil Elwell <phil@raspberrypi.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] mmc: spi: Toggle SPI polarity, do not hardcode it
Date: Mon, 16 Dec 2019 13:09:12 +0100	[thread overview]
Message-ID: <CAPDyKFotLu_SxpKEPBWgPjrR0+57Ou6VRL=egPGvJVMSr4vCGw@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdai6FwgwD7+BeF0_ORw4P1hoCv4dvoi_Uhyp21t5qCOjw@mail.gmail.com>

On Wed, 11 Dec 2019 at 00:11, Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Tue, Dec 10, 2019 at 10:52 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > On Wed, 4 Dec 2019 at 16:29, Linus Walleij <linus.walleij@linaro.org> wrote:
> > >
> > > The code in mmc_spi_initsequence() tries to send a burst with
> > > high chipselect and for this reason hardcodes the device into
> > > SPI_CS_HIGH.
> > >
> > > This is not good because the SPI_CS_HIGH flag indicates
> > > logical "asserted" CS not always the physical level. In
> > > some cases the signal is inverted in the GPIO library and
> > > in that case SPI_CS_HIGH is already set, and enforcing
> > > SPI_CS_HIGH again will actually drive it low.
> > >
> > > Instead of hard-coding this, toggle the polarity so if the
> > > default is LOW it goes high to assert chipselect but if it
> > > is already high then toggle it low instead.
> > >
> > > Cc: Phil Elwell <phil@raspberrypi.org>
> > > Reported-by: Mark Brown <broonie@kernel.org>
> > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > Seems like we should add a stable tag, right?
>
> Yeah I agree.

Alright. I have amended the patch to add the tag.

Kind regards
Uffe

      reply	other threads:[~2019-12-16 12:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 15:27 [PATCH] mmc: spi: Toggle SPI polarity, do not hardcode it Linus Walleij
2019-12-04 17:20 ` Mark Brown
2019-12-10  9:51 ` Ulf Hansson
2019-12-10 23:10   ` Linus Walleij
2019-12-16 12:09     ` Ulf Hansson [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='CAPDyKFotLu_SxpKEPBWgPjrR0+57Ou6VRL=egPGvJVMSr4vCGw@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=phil@raspberrypi.org \
    /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).