spi: Fixes for v6.15

A few more device specific fixes plus one trivial quirk.  There's a
 couple of patches for Tegra which avoid some fairly spectacular log spam
 if the hardware breaks in ways which were actually seen in production,
 plus a fix for the i.MX driver to propagate errors properly when setting
 up the hardware.  We also have a trivial patch marking the sun4i driver
 as being compatible with GPIO chip selects.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmgBUaYACgkQJNaLcl1U
 h9A3bQf+JlT85HXcrLiUmoQV2L4H09bzSdMTDR5xb5LweOOB4vp81zpxBerY3mPC
 xqzHU66M+PXWN0NP8TcxMlLgJ1fZhx/0iET1U07gALGQjJUGHhYUGJxTjuhsnEfP
 B/XU0R4FTTCbJ4FnlOTxEfA4sdfpMjByvn6Y0QJfdmcGIiI0dQo83RfZ3ETLgUaX
 RFjYvibGkszqu0hDducx7I95gflZOazZ8y0xhli7Cf2ZfI4SDAWpQgVT238r1tlH
 RiJbVf+GqIAMkO85Ucmx27mWVzIT8WrQCop6zZTuKW8xSJi/G7rKfynBgDEybxtM
 kewqt/wHAyHFNT3uPJDmWt67CndzuA==
 =7DAY
 -----END PGP SIGNATURE-----

Merge tag 'spi-fix-v6.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few more device specific fixes plus one trivial quirk.

  There's a couple of patches for Tegra which avoid some fairly
  spectacular log spam if the hardware breaks in ways which were
  actually seen in production, plus a fix for the i.MX driver to
  propagate errors properly when setting up the hardware.

  We also have a trivial patch marking the sun4i driver as being
  compatible with GPIO chip selects"

* tag 'spi-fix-v6.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-imx: Add check for spi_imx_setupxfer()
  spi: tegra210-quad: add rate limiting and simplify timeout error message
  spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
  spi: sun4i: add support for GPIO chip select lines
This commit is contained in:
Linus Torvalds 2025-04-17 14:10:13 -07:00
commit 272876d599
3 changed files with 8 additions and 4 deletions

View File

@ -1695,9 +1695,12 @@ static int spi_imx_transfer_one(struct spi_controller *controller,
struct spi_device *spi,
struct spi_transfer *transfer)
{
int ret;
struct spi_imx_data *spi_imx = spi_controller_get_devdata(spi->controller);
spi_imx_setupxfer(spi, transfer);
ret = spi_imx_setupxfer(spi, transfer);
if (ret < 0)
return ret;
transfer->effective_speed_hz = spi_imx->spi_bus_clk;
/* flush rxfifo before transfer */

View File

@ -462,6 +462,7 @@ static int sun4i_spi_probe(struct platform_device *pdev)
sspi->host = host;
host->max_speed_hz = 100 * 1000 * 1000;
host->min_speed_hz = 3 * 1000;
host->use_gpio_descriptors = true;
host->set_cs = sun4i_spi_set_cs;
host->transfer_one = sun4i_spi_transfer_one;
host->num_chipselect = 4;

View File

@ -1117,9 +1117,9 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi,
(&tqspi->xfer_completion,
QSPI_DMA_TIMEOUT);
if (WARN_ON(ret == 0)) {
dev_err(tqspi->dev, "QSPI Transfer failed with timeout: %d\n",
ret);
if (WARN_ON_ONCE(ret == 0)) {
dev_err_ratelimited(tqspi->dev,
"QSPI Transfer failed with timeout\n");
if (tqspi->is_curr_dma_xfer &&
(tqspi->cur_direction & DATA_DIR_TX))
dmaengine_terminate_all