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)
commitcfeefa79dc37d378216e2ced1600e297dd04e591
treefe0e541905e9ee3e081d6c90d5a2e19c3ce3766c
parentefc92fbb876014c8efa4d90f4ac4b49569f0a84e
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