Skip to content

Commit d5c6b03

Browse files
matijaGPsmb49
authored andcommitted
spi: davinci: invoke chipselect callback
BugLink: https://bugs.launchpad.net/bugs/1946788 [ Upstream commit ea4ab99 ] Davinci needs to configure chipselect on transfer. Fixes: 4a07b8b ("spi: bitbang: Make chipselect callback optional") Signed-off-by: Matija Glavinic Pecotic <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Kelsey Skunberg <[email protected]>
1 parent 63f6b1e commit d5c6b03

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/spi/spi-davinci.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,6 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
213213
* line for the controller
214214
*/
215215
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-
*/
222216
if (value == BITBANG_CS_ACTIVE)
223217
gpiod_set_value(spi->cs_gpiod, 1);
224218
else
@@ -950,7 +944,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
950944
master->bus_num = pdev->id;
951945
master->num_chipselect = pdata->num_chipselect;
952946
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16);
953-
master->flags = SPI_MASTER_MUST_RX;
947+
master->flags = SPI_MASTER_MUST_RX | SPI_MASTER_GPIO_SS;
954948
master->setup = davinci_spi_setup;
955949
master->cleanup = davinci_spi_cleanup;
956950
master->can_dma = davinci_spi_can_dma;

0 commit comments

Comments
 (0)