Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: davinci: Remove chip select GPIO pdata

The DaVinci SPI can use either:
- Internal chip selects (inside the SPI host)
- External chip selects (using GPIO)
- External chip selects passed in pdata

The last way of passing external chip selects through
platform data is not used in the kernel. Delete it to make
the code simpler when refactoring GPIO.

Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Michele Dionisio <michele.dionisio@gmail.com>
Cc: Frode Isaksen <fisaksen@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Linus Walleij and committed by
Mark Brown
56df612a e757996c

-11
-7
drivers/spi/spi-davinci.c
··· 432 432 retval = gpio_direction_output( 433 433 spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); 434 434 internal_cs = false; 435 - } else if (pdata->chip_sel && 436 - spi->chip_select < pdata->num_chipselect && 437 - pdata->chip_sel[spi->chip_select] != SPI_INTERN_CS) { 438 - spi->cs_gpio = pdata->chip_sel[spi->chip_select]; 439 - retval = gpio_direction_output( 440 - spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); 441 - internal_cs = false; 442 435 } 443 436 444 437 if (retval) {
-4
include/linux/platform_data/spi-davinci.h
··· 36 36 * @num_chipselect: number of chipselects supported by this SPI master 37 37 * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt 38 38 * controller withn the SoC. Possible values are 0 and 1. 39 - * @chip_sel: list of GPIOs which can act as chip-selects for the SPI. 40 - * SPI_INTERN_CS denotes internal SPI chip-select. Not necessary 41 - * to populate if all chip-selects are internal. 42 39 * @cshold_bug: set this to true if the SPI controller on your chip requires 43 40 * a write to CSHOLD bit in between transfers (like in DM355). 44 41 * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any ··· 45 48 u8 version; 46 49 u8 num_chipselect; 47 50 u8 intr_line; 48 - u8 *chip_sel; 49 51 u8 prescaler_limit; 50 52 bool cshold_bug; 51 53 enum dma_event_q dma_event_q;