Skip to content
Unverified Commit d347b4aa authored by David Bauer's avatar David Bauer Committed by Mark Brown
Browse files

spi: sync up initial chipselect state

When initially probing the SPI slave device, the call for disabling an
SPI device without the SPI_CS_HIGH flag is not applied, as the
condition for checking whether or not the state to be applied equals the
one currently set evaluates to true.

This however might not necessarily be the case, as the chipselect might
be active.

Add a force flag to spi_set_cs which allows to override this
early exit condition. Set it to false everywhere except when called
from spi_setup to sync up the initial CS state.

Fixes commit d40f0b6f

 ("spi: Avoid setting the chip select if we don't
need to")

Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
Link: https://lore.kernel.org/r/20210416195956.121811-1-mail@david-bauer.net
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 126bdb60
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment