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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'spi-fix-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
"A small clutch of driver specific fixes.

The OMAP one is a bit worrying since it seems to be triggered by some
changes in the runtime PM core code and I suspect there's other
drivers across that are going to be using the same pattern outside of
OMAP but nothing seems to be coming up in the testing people are
doing"

* tag 'spi-fix-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: omap2-mcspi: Fix PM regression with deferred probe for pm_runtime_reinit
spi: bcm2835aux: fix bitmask defines
spi: atmel: fix gpio chip-select in case of non-DT platform
spi/fsl-espi: Correct the maximum transaction length
spi: imx: fix spi resource leak with dma transfer
spi: fix counting in spi-loopback-test code

+14 -7
+1
drivers/spi/spi-atmel.c
··· 1571 1571 1572 1572 as->use_cs_gpios = true; 1573 1573 if (atmel_spi_is_v2(as) && 1574 + pdev->dev.of_node && 1574 1575 !of_get_property(pdev->dev.of_node, "cs-gpios", NULL)) { 1575 1576 as->use_cs_gpios = false; 1576 1577 master->num_chipselect = 4;
+2 -2
drivers/spi/spi-bcm2835aux.c
··· 73 73 74 74 /* Bitfields in CNTL1 */ 75 75 #define BCM2835_AUX_SPI_CNTL1_CSHIGH 0x00000700 76 - #define BCM2835_AUX_SPI_CNTL1_IDLE 0x00000080 77 - #define BCM2835_AUX_SPI_CNTL1_TXEMPTY 0x00000040 76 + #define BCM2835_AUX_SPI_CNTL1_TXEMPTY 0x00000080 77 + #define BCM2835_AUX_SPI_CNTL1_IDLE 0x00000040 78 78 #define BCM2835_AUX_SPI_CNTL1_MSBF_IN 0x00000002 79 79 #define BCM2835_AUX_SPI_CNTL1_KEEP_IN 0x00000001 80 80
+2 -2
drivers/spi/spi-fsl-espi.c
··· 84 84 /* SPCOM register values */ 85 85 #define SPCOM_CS(x) ((x) << 30) 86 86 #define SPCOM_TRANLEN(x) ((x) << 0) 87 - #define SPCOM_TRANLEN_MAX 0xFFFF /* Max transaction length */ 87 + #define SPCOM_TRANLEN_MAX 0x10000 /* Max transaction length */ 88 88 89 89 #define AUTOSUSPEND_TIMEOUT 2000 90 90 ··· 233 233 reinit_completion(&mpc8xxx_spi->done); 234 234 235 235 /* Set SPCOM[CS] and SPCOM[TRANLEN] field */ 236 - if ((t->len - 1) > SPCOM_TRANLEN_MAX) { 236 + if (t->len > SPCOM_TRANLEN_MAX) { 237 237 dev_err(mpc8xxx_spi->dev, "Transaction length (%d)" 238 238 " beyond the SPCOM[TRANLEN] field\n", t->len); 239 239 return -EINVAL;
+5 -3
drivers/spi/spi-imx.c
··· 929 929 tx->sgl, tx->nents, DMA_MEM_TO_DEV, 930 930 DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 931 931 if (!desc_tx) 932 - goto no_dma; 932 + goto tx_nodma; 933 933 934 934 desc_tx->callback = spi_imx_dma_tx_callback; 935 935 desc_tx->callback_param = (void *)spi_imx; ··· 941 941 rx->sgl, rx->nents, DMA_DEV_TO_MEM, 942 942 DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 943 943 if (!desc_rx) 944 - goto no_dma; 944 + goto rx_nodma; 945 945 946 946 desc_rx->callback = spi_imx_dma_rx_callback; 947 947 desc_rx->callback_param = (void *)spi_imx; ··· 1008 1008 1009 1009 return ret; 1010 1010 1011 - no_dma: 1011 + rx_nodma: 1012 + dmaengine_terminate_all(master->dma_tx); 1013 + tx_nodma: 1012 1014 pr_warn_once("%s %s: DMA not available, falling back to PIO\n", 1013 1015 dev_driver_string(&master->dev), 1014 1016 dev_name(&master->dev));
+1
drivers/spi/spi-loopback-test.c
··· 761 761 test.iterate_transfer_mask = 1; 762 762 763 763 /* count number of transfers with tx/rx_buf != NULL */ 764 + rx_count = tx_count = 0; 764 765 for (i = 0; i < test.transfer_count; i++) { 765 766 if (test.transfers[i].tx_buf) 766 767 tx_count++;
+3
drivers/spi/spi-omap2-mcspi.c
··· 1490 1490 return status; 1491 1491 1492 1492 disable_pm: 1493 + pm_runtime_dont_use_autosuspend(&pdev->dev); 1494 + pm_runtime_put_sync(&pdev->dev); 1493 1495 pm_runtime_disable(&pdev->dev); 1494 1496 free_master: 1495 1497 spi_master_put(master); ··· 1503 1501 struct spi_master *master = platform_get_drvdata(pdev); 1504 1502 struct omap2_mcspi *mcspi = spi_master_get_devdata(master); 1505 1503 1504 + pm_runtime_dont_use_autosuspend(mcspi->dev); 1506 1505 pm_runtime_put_sync(mcspi->dev); 1507 1506 pm_runtime_disable(&pdev->dev); 1508 1507