Skip to content

Commit 0eb0ce0

Browse files
committed
Merge tag 'spi-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A bunch of small, device specific things here plus a DT bindings fix for the new validatable YAML binding format. The most notable thing is the fix for GPIO chip selects which fixes a corner case in updates of that code to modern APIs, unfortunately due to a historical mess the code around GPIO support is obscure, fragile and an ABI which makes and attempt to improve the situation painful" * tag 'spi-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: pxa2xx: Add support for Intel Tiger Lake spi: bcm2835: Fix 3-wire mode if DMA is enabled spi: pxa2xx: Balance runtime PM enable/disable on error spi: gpio: Add SPI_MASTER_GPIO_SS flag spi: spi-fsl-qspi: change i.MX7D RX FIFO size spi: dt-bindings: spi-controller: remove unnecessary 'maxItems: 1' from reg
2 parents df9edcb + a412795 commit 0eb0ce0

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

Documentation/devicetree/bindings/spi/spi-controller.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ patternProperties:
7373
Compatible of the SPI device.
7474

7575
reg:
76-
maxItems: 1
7776
minimum: 0
7877
maximum: 256
7978
description:

drivers/spi/spi-bcm2835.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,8 @@ static int bcm2835_spi_transfer_one(struct spi_controller *ctlr,
834834
bcm2835_wr(bs, BCM2835_SPI_CLK, cdiv);
835835

836836
/* handle all the 3-wire mode */
837-
if ((spi->mode & SPI_3WIRE) && (tfr->rx_buf))
837+
if (spi->mode & SPI_3WIRE && tfr->rx_buf &&
838+
tfr->rx_buf != ctlr->dummy_rx)
838839
cs |= BCM2835_SPI_CS_REN;
839840
else
840841
cs &= ~BCM2835_SPI_CS_REN;

drivers/spi/spi-fsl-qspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static const struct fsl_qspi_devtype_data imx6sx_data = {
206206
};
207207

208208
static const struct fsl_qspi_devtype_data imx7d_data = {
209-
.rxfifo = SZ_512,
209+
.rxfifo = SZ_128,
210210
.txfifo = SZ_512,
211211
.ahb_buf_size = SZ_1K,
212212
.quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK,

drivers/spi/spi-gpio.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,12 @@ static int spi_gpio_probe(struct platform_device *pdev)
410410

411411
bb = &spi_gpio->bitbang;
412412
bb->master = master;
413+
/*
414+
* There is some additional business, apart from driving the CS GPIO
415+
* line, that we need to do on selection. This makes the local
416+
* callback for chipselect always get called.
417+
*/
418+
master->flags |= SPI_MASTER_GPIO_SS;
413419
bb->chipselect = spi_gpio_chipselect;
414420
bb->set_line_direction = spi_gpio_set_direction;
415421

drivers/spi/spi-pxa2xx.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,14 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = {
14571457
{ PCI_VDEVICE(INTEL, 0x02aa), LPSS_CNL_SSP },
14581458
{ PCI_VDEVICE(INTEL, 0x02ab), LPSS_CNL_SSP },
14591459
{ PCI_VDEVICE(INTEL, 0x02fb), LPSS_CNL_SSP },
1460+
/* TGL-LP */
1461+
{ PCI_VDEVICE(INTEL, 0xa0aa), LPSS_CNL_SSP },
1462+
{ PCI_VDEVICE(INTEL, 0xa0ab), LPSS_CNL_SSP },
1463+
{ PCI_VDEVICE(INTEL, 0xa0de), LPSS_CNL_SSP },
1464+
{ PCI_VDEVICE(INTEL, 0xa0df), LPSS_CNL_SSP },
1465+
{ PCI_VDEVICE(INTEL, 0xa0fb), LPSS_CNL_SSP },
1466+
{ PCI_VDEVICE(INTEL, 0xa0fd), LPSS_CNL_SSP },
1467+
{ PCI_VDEVICE(INTEL, 0xa0fe), LPSS_CNL_SSP },
14601468
{ },
14611469
};
14621470

@@ -1831,14 +1839,16 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
18311839
status = devm_spi_register_controller(&pdev->dev, controller);
18321840
if (status != 0) {
18331841
dev_err(&pdev->dev, "problem registering spi controller\n");
1834-
goto out_error_clock_enabled;
1842+
goto out_error_pm_runtime_enabled;
18351843
}
18361844

18371845
return status;
18381846

1839-
out_error_clock_enabled:
1847+
out_error_pm_runtime_enabled:
18401848
pm_runtime_put_noidle(&pdev->dev);
18411849
pm_runtime_disable(&pdev->dev);
1850+
1851+
out_error_clock_enabled:
18421852
clk_disable_unprepare(ssp->clk);
18431853

18441854
out_error_dma_irq_alloc:

0 commit comments

Comments
 (0)