diff options
author | Mark Brown <broonie@kernel.org> | 2020-01-23 15:37:18 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-01-23 15:37:18 +0300 |
commit | 754a36a58c29718bf5e28b8789b17bffbb60e8a6 (patch) | |
tree | e0772eb7f3248ce030b52774e57f510f85933d58 /include/linux/spi | |
parent | 7265e8fc51081f08728cc7528fd4640a81ec6768 (diff) | |
parent | a5362b84bdff1def10c136e36ef2126f7f545b2c (diff) | |
download | linux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.tar.xz |
Merge branch 'spi-5.6' into spi-next
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi.h | 8 | ||||
-rw-r--r-- | include/linux/spi/spi_oc_tiny.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 3a67a7e45633..6d16ba01ff5a 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -423,6 +423,12 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) * GPIO descriptors rather than using global GPIO numbers grabbed by the * driver. This will fill in @cs_gpiods and @cs_gpios should not be used, * and SPI devices will have the cs_gpiod assigned rather than cs_gpio. + * @unused_native_cs: When cs_gpiods is used, spi_register_controller() will + * fill in this field with the first unused native CS, to be used by SPI + * controller drivers that need to drive a native CS when using GPIO CS. + * @max_native_cs: When cs_gpiods is used, and this field is filled in, + * spi_register_controller() will validate all native CS (including the + * unused native CS) against this value. * @statistics: statistics for the spi_controller * @dma_tx: DMA transmit channel * @dma_rx: DMA receive channel @@ -624,6 +630,8 @@ struct spi_controller { int *cs_gpios; struct gpio_desc **cs_gpiods; bool use_gpio_descriptors; + u8 unused_native_cs; + u8 max_native_cs; /* statistics */ struct spi_statistics statistics; diff --git a/include/linux/spi/spi_oc_tiny.h b/include/linux/spi/spi_oc_tiny.h index a3ecf2feadf2..284872ac130c 100644 --- a/include/linux/spi/spi_oc_tiny.h +++ b/include/linux/spi/spi_oc_tiny.h @@ -6,16 +6,12 @@ * struct tiny_spi_platform_data - platform data of the OpenCores tiny SPI * @freq: input clock freq to the core. * @baudwidth: baud rate divider width of the core. - * @gpio_cs_count: number of gpio pins used for chipselect. - * @gpio_cs: array of gpio pins used for chipselect. * * freq and baudwidth are used only if the divider is programmable. */ struct tiny_spi_platform_data { unsigned int freq; unsigned int baudwidth; - unsigned int gpio_cs_count; - int *gpio_cs; }; #endif /* _LINUX_SPI_SPI_OC_TINY_H */ |