Skip to content

Commit b40af61

Browse files
robimarkobroonie
authored andcommitted
spi: qup: support using GPIO as chip select line
Most of the device with QUP SPI adapter are actually using GPIO-s for chip select. However, this stopped working after ("spi: Retire legacy GPIO handling") as it introduced a check on ->use_gpio_descriptors flag and since spi-qup driver does not set the flag it meant that all of boards using GPIO-s and with QUP adapter SPI devices stopped working. So, to enable using GPIO-s again set ->use_gpio_descriptors to true and populate ->max_native_cs. Fixes: f48dc6b ("spi: Retire legacy GPIO handling") Signed-off-by: Robert Marko <[email protected]> Cc: [email protected] Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6a43cd0 commit b40af61

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/spi/spi-qup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,8 @@ static int spi_qup_probe(struct platform_device *pdev)
10571057
else
10581058
master->num_chipselect = num_cs;
10591059

1060+
master->use_gpio_descriptors = true;
1061+
master->max_native_cs = SPI_NUM_CHIPSELECTS;
10601062
master->bus_num = pdev->id;
10611063
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;
10621064
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);

0 commit comments

Comments
 (0)