Patch "spi: qup: support using GPIO as chip select line" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: qup: support using GPIO as chip select line

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-qup-support-using-gpio-as-chip-select-line.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9506c74f56bccca8bac58f17a03084942ef4a7cf
Author: Robert Marko <robert.marko@xxxxxxxxxx>
Date:   Thu Oct 6 21:48:19 2022 +0200

    spi: qup: support using GPIO as chip select line
    
    [ Upstream commit b40af6183b685b0cf7870987b858de0d48db9ea0 ]
    
    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: f48dc6b96649 ("spi: Retire legacy GPIO handling")
    Signed-off-by: Robert Marko <robert.marko@xxxxxxxxxx>
    Cc: luka.perkov@xxxxxxxxxx
    Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221006194819.1536932-1-robert.marko@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 7d89510dc3f0..678dc51ef017 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -1057,6 +1057,8 @@ static int spi_qup_probe(struct platform_device *pdev)
 	else
 		master->num_chipselect = num_cs;
 
+	master->use_gpio_descriptors = true;
+	master->max_native_cs = SPI_NUM_CHIPSELECTS;
 	master->bus_num = pdev->id;
 	master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;
 	master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux