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

spi: davinci: invoke chipselect callback

Davinci needs to configure chipselect on transfer.

Fixes: 4a07b8bcd503 ("spi: bitbang: Make chipselect callback optional")
Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Link: https://lore.kernel.org/r/735fb7b0-82aa-5b9b-85e4-53f0c348cc0e@nokia.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Matija Glavinic Pecotic and committed by
Mark Brown
ea4ab99c d68f4c73

+1 -7
+1 -7
drivers/spi/spi-davinci.c
··· 213 213 * line for the controller 214 214 */ 215 215 if (spi->cs_gpiod) { 216 - /* 217 - * FIXME: is this code ever executed? This host does not 218 - * set SPI_MASTER_GPIO_SS so this chipselect callback should 219 - * not get called from the SPI core when we are using 220 - * GPIOs for chip select. 221 - */ 222 216 if (value == BITBANG_CS_ACTIVE) 223 217 gpiod_set_value(spi->cs_gpiod, 1); 224 218 else ··· 939 945 master->bus_num = pdev->id; 940 946 master->num_chipselect = pdata->num_chipselect; 941 947 master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16); 942 - master->flags = SPI_MASTER_MUST_RX; 948 + master->flags = SPI_MASTER_MUST_RX | SPI_MASTER_GPIO_SS; 943 949 master->setup = davinci_spi_setup; 944 950 master->cleanup = davinci_spi_cleanup; 945 951 master->can_dma = davinci_spi_can_dma;