]> git.baikalelectronics.ru Git - kernel.git/commit
spi: cadence: Fix default polarity of native chipselect
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 16 Jan 2019 08:21:09 +0000 (09:21 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 24 Jan 2019 19:03:11 +0000 (19:03 +0000)
commit6a6ecc070297dcb3285d11e0a6596dacfcb0805e
tree9ee089b805a9ac4da95b91799454796a45cdc9d5
parente004072215ac23d07b6068b19a418ea35a7ce679
spi: cadence: Fix default polarity of native chipselect

The Cadence controller also supports platforms specifying
native chipselects. When I enforce the use of high CS
for drivers opting in for using GPIO descriptors, I
inadvertedly switched the driver to also use active
high chip select for native chip selects.

Fix this by inverting the logic in the callback for the
native chip select. Rename the parameter from "is_high"
(which is interpreted as being high when 0, which is
confusing, I will not make any drug-related jokes here)
to "enabled" which is more intuitive, especially now that
it is true when CS is supposed to be enabled.

Cc: Wei Yongjun <weiyongjun1@huawei.com>
Fixes: 97817ef9456f ("spi: cadence: Convert to use CS GPIO descriptors")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c