]> git.baikalelectronics.ru Git - kernel.git/commit
spi: cadence: Convert to use CS GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 7 Jan 2019 15:51:53 +0000 (16:51 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 9 Jan 2019 12:41:45 +0000 (12:41 +0000)
commit97817ef9456f1f5414bc88379c5e6b2815c17647
treefe0e541905e9ee3e081d6c90d5a2e19c3ce3766c
parent13cea80feda107400d4077258a6154275d6a3454
spi: cadence: Convert to use CS GPIO descriptors

This converts the Cadence SPI master driver to use GPIO
descriptors for chip select handling.

The Cadence driver was allocating a state container just
to hold the requested GPIO line and contained lots of
polarity inversion code. As this is all handled by gpiolib
and a simple devm_* request in the core, and as the driver
is fully device tree only, most of this code chunk goes
away in favour of central handling. The setup/cleanup
callbacks goes away.

This driver does NOT drive the CS line by setting the
value of the GPIO so it relies on the SPI core to do
this, which should work just fine with the descriptors.

Cc: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Janek Kotas <jank@cadence.com>
Cc: Linuxarm <linuxarm@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c