OSDN Git Service

spi: pl022: Use GPIOs looked up by the core
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 30 Mar 2021 16:49:06 +0000 (18:49 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 31 Mar 2021 12:54:28 +0000 (13:54 +0100)
commit77f983a9df421fa00ca6a2f494dc79f8afca75a2
treeacb5e8387b822d809f65935ef44706299e9f5e60
parent4179e576b56d82e5ce007b9f548efb90605e2713
spi: pl022: Use GPIOs looked up by the core

The SPI core looks up GPIO lines from the device tree,
so let's stop trying to do that on our own and rely
on the core to do this for us.

In addition to the GPIO line we also need to keep
track of the chip select index separately, as the native
chip select needs this index. The driver was reusing
the same GPIO array for native chip select indices,
so keep this in a separate state variable instead.

The facility to pass in custom GPIO lines from the
platform data can go, because even if we do have
out-of-tree code that want to use platform data, they
can soon pass in GPIOs using machine GPIO descriptor
tables which will be available after the next step
when we convert the driver to using GPIO descriptors.

The implicit inclusion of <linux/of.h> is made
explicit as we no longer need to include <linux/of_gpio.h>.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210330164907.2346010-2-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pl022.c
include/linux/amba/pl022.h