Re: [PATCH] mmc: spi: Toggle SPI polarity, do not hardcode it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 11 Dec 2019 at 00:11, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>
> On Tue, Dec 10, 2019 at 10:52 AM Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> > On Wed, 4 Dec 2019 at 16:29, Linus Walleij <linus.walleij@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx>
> > > Reported-by: Mark Brown <broonie@xxxxxxxxxx>
> > > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> >
> > 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



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux