Linux SPI subsystem development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Liguang Zhang <zhangliguang@linux.alibaba.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: set right CS polarity depend on gpiolib
Date: Fri, 7 May 2021 16:30:09 +0100	[thread overview]
Message-ID: <20210507153009.GB6383@sirena.org.uk> (raw)
In-Reply-To: <20210507145117.43221-1-zhangliguang@linux.alibaba.com>

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

On Fri, May 07, 2021 at 10:51:17PM +0800, Liguang Zhang wrote:
> After a kernel upgrade from 4.19 to 5.10, we found that tpm flow control
> always causes TIMEOUT which caused by wrong CS polarity setting depend
> on gpiolib.

>  			if (spi->cs_gpiod)
>  				/* polarity handled by gpiolib */
> -				gpiod_set_value_cansleep(spi->cs_gpiod, activate);
> +				gpiod_set_value_cansleep(spi->cs_gpiod, !enable);

Whatever is going on here it doesn't seem likely that this is a problem
in the SPI core given the widespread use of gpiod based chip selects -
can you provide more explanation of what you're seeing here, how is the
chip select configured, what is the hardware expectation and what
actually ends up happening?

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

  reply	other threads:[~2021-05-07 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 14:51 [PATCH] spi: set right CS polarity depend on gpiolib Liguang Zhang
2021-05-07 15:30 ` Mark Brown [this message]
2021-05-08  1:01   ` 乱石

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=20210507153009.GB6383@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=zhangliguang@linux.alibaba.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