diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2021-03-30 18:49:06 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-31 13:54:28 +0100 |
commit | 77f983a9df421fa00ca6a2f494dc79f8afca75a2 (patch) | |
tree | acb5e8387b822d809f65935ef44706299e9f5e60 /include/linux/amba | |
parent | 4179e576b56d82e5ce007b9f548efb90605e2713 (diff) |
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>
Diffstat (limited to 'include/linux/amba')
-rw-r--r-- | include/linux/amba/pl022.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index 29274cedefde..9bf58aac0df2 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h @@ -223,10 +223,6 @@ struct dma_chan; /** * struct pl022_ssp_master - device.platform_data for SPI controller devices. * @bus_id: identifier for this bus - * @num_chipselect: chipselects are used to distinguish individual - * SPI slaves, and are numbered from zero to num_chipselects - 1. - * each slave has a chipselect signal, but it's common that not - * every chipselect is connected to a slave. * @enable_dma: if true enables DMA driven transfers. * @dma_rx_param: parameter to locate an RX DMA channel. * @dma_tx_param: parameter to locate a TX DMA channel. @@ -235,18 +231,15 @@ struct dma_chan; * indicates no delay and the device will be suspended immediately. * @rt: indicates the controller should run the message pump with realtime * priority to minimise the transfer latency on the bus. - * @chipselects: list of <num_chipselects> chip select gpios */ struct pl022_ssp_controller { u16 bus_id; - u8 num_chipselect; u8 enable_dma:1; bool (*dma_filter)(struct dma_chan *chan, void *filter_param); void *dma_rx_param; void *dma_tx_param; int autosuspend_delay; bool rt; - int *chipselects; }; /** |