Skip to content

Commit 272876d

Browse files
committed
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
2 parents b5c6891 + 951a04a commit 272876d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

drivers/spi/spi-imx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,9 +1695,12 @@ static int spi_imx_transfer_one(struct spi_controller *controller,
16951695
struct spi_device *spi,
16961696
struct spi_transfer *transfer)
16971697
{
1698+
int ret;
16981699
struct spi_imx_data *spi_imx = spi_controller_get_devdata(spi->controller);
16991700

1700-
spi_imx_setupxfer(spi, transfer);
1701+
ret = spi_imx_setupxfer(spi, transfer);
1702+
if (ret < 0)
1703+
return ret;
17011704
transfer->effective_speed_hz = spi_imx->spi_bus_clk;
17021705

17031706
/* flush rxfifo before transfer */

drivers/spi/spi-sun4i.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ static int sun4i_spi_probe(struct platform_device *pdev)
462462
sspi->host = host;
463463
host->max_speed_hz = 100 * 1000 * 1000;
464464
host->min_speed_hz = 3 * 1000;
465+
host->use_gpio_descriptors = true;
465466
host->set_cs = sun4i_spi_set_cs;
466467
host->transfer_one = sun4i_spi_transfer_one;
467468
host->num_chipselect = 4;

drivers/spi/spi-tegra210-quad.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,9 +1117,9 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi,
11171117
(&tqspi->xfer_completion,
11181118
QSPI_DMA_TIMEOUT);
11191119

1120-
if (WARN_ON(ret == 0)) {
1121-
dev_err(tqspi->dev, "QSPI Transfer failed with timeout: %d\n",
1122-
ret);
1120+
if (WARN_ON_ONCE(ret == 0)) {
1121+
dev_err_ratelimited(tqspi->dev,
1122+
"QSPI Transfer failed with timeout\n");
11231123
if (tqspi->is_curr_dma_xfer &&
11241124
(tqspi->cur_direction & DATA_DIR_TX))
11251125
dmaengine_terminate_all

0 commit comments

Comments
 (0)