]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Support high CS when using descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 16 Jan 2019 08:21:07 +0000 (09:21 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 24 Jan 2019 19:01:05 +0000 (19:01 +0000)
commite306380e5eae07dd1e78d4f9363c2a03dfa69d28
treeec7b2f507f4207795f644f607acf55dbe8ef80ca
parent92f651075d1140fc108117df81b60bd595b146de
spi: Support high CS when using descriptors

All controllers using GPIO descriptors can by definition
support high CS connections, so just enforce this when
registering an SPI controller.

This fixes a regression where controllers were missing
SPI_CS_HIGH, the drivers would fail like this:

spi spi0.0: setup: unsupported mode bits 4
cdns-spi fd0b0000.spi: can't setup spi0.0, status -22

This is because as using descriptors moves the CS inversion
logic over to gpiolib, all such controllers are registered
with CS active high.

Cc: Jan Kotas <jank@cadence.com>
Reported-by: Jan Kotas <jank@cadence.com>
Tested-by: Jan Kotas <jank@cadence.com>
Fixes: 13bca5fb5e26 ("spi: Optionally use GPIO descriptors for CS GPIOs")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c