Re: [PATCH] spi: set right CS polarity depend on gpiolib

From: Mark Brown
Date: Fri May 07 2021 - 11:30:52 EST


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: signature.asc
Description: PGP signature