Skip to content

Commit 78f2a78

Browse files
committed
Merge tag 'spi-fix-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A small collection of fixes for various SPI drivers, plus a relaxation of constraints in the DT for the DesignWare controller to reflect hardware that's been seen. There's several fixes for the Cadence QuadSPI driver since a fix during the last release made some existing issues with error handling during probe more readily visible" * tag 'spi-fix-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: mt65xx: Use IRQF_ONESHOT with threaded IRQ spi: dt-bindings: snps,dw-abp-ssi: Allow up to 16 chip-selects spi: cadence-quadspi: Fix clock disable on probe failure path spi: cadence-quadspi: Add error logging for DMA request failure spi: fsl-cpm: Check length parity before switching to 16 bit mode spi: mpfs: Fix an error handling path in mpfs_spi_probe()
2 parents 91ff28a + 9d651a6 commit 78f2a78

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ properties:
121121
num-cs:
122122
default: 4
123123
minimum: 1
124-
maximum: 4
124+
maximum: 16
125125

126126
dmas:
127127
items:
@@ -153,14 +153,14 @@ properties:
153153
provides an interface to override the native DWC SSI CS control.
154154

155155
patternProperties:
156-
"@[0-9a-f]+$":
156+
"@[0-9a-f]$":
157157
type: object
158158
additionalProperties: true
159159

160160
properties:
161161
reg:
162162
minimum: 0
163-
maximum: 3
163+
maximum: 0xf
164164

165165
unevaluatedProperties: false
166166

drivers/spi/spi-cadence-quadspi.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,8 +2001,10 @@ static int cqspi_probe(struct platform_device *pdev)
20012001

20022002
if (cqspi->use_direct_mode) {
20032003
ret = cqspi_request_mmap_dma(cqspi);
2004-
if (ret == -EPROBE_DEFER)
2004+
if (ret == -EPROBE_DEFER) {
2005+
dev_err_probe(&pdev->dev, ret, "Failed to request mmap DMA\n");
20052006
goto probe_setup_failed;
2007+
}
20062008
}
20072009

20082010
ret = spi_register_controller(host);
@@ -2024,7 +2026,9 @@ static int cqspi_probe(struct platform_device *pdev)
20242026
probe_reset_failed:
20252027
if (cqspi->is_jh7110)
20262028
cqspi_jh7110_disable_clk(pdev, cqspi);
2027-
clk_disable_unprepare(cqspi->clk);
2029+
2030+
if (pm_runtime_get_sync(&pdev->dev) >= 0)
2031+
clk_disable_unprepare(cqspi->clk);
20282032
probe_clk_failed:
20292033
return ret;
20302034
}

drivers/spi/spi-fsl-spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static int fsl_spi_prepare_message(struct spi_controller *ctlr,
335335
if (t->bits_per_word == 16 || t->bits_per_word == 32)
336336
t->bits_per_word = 8; /* pretend its 8 bits */
337337
if (t->bits_per_word == 8 && t->len >= 256 &&
338-
(mpc8xxx_spi->flags & SPI_CPM1))
338+
!(t->len & 1) && (mpc8xxx_spi->flags & SPI_CPM1))
339339
t->bits_per_word = 16;
340340
}
341341
}

drivers/spi/spi-mpfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ static int mpfs_spi_probe(struct platform_device *pdev)
577577

578578
ret = devm_spi_register_controller(&pdev->dev, host);
579579
if (ret) {
580+
mpfs_spi_disable_ints(spi);
580581
mpfs_spi_disable(spi);
581582
return dev_err_probe(&pdev->dev, ret,
582583
"unable to register host for SPI controller\n");

drivers/spi/spi-mt65xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ static int mtk_spi_probe(struct platform_device *pdev)
13201320

13211321
ret = devm_request_threaded_irq(dev, irq, mtk_spi_interrupt,
13221322
mtk_spi_interrupt_thread,
1323-
IRQF_TRIGGER_NONE, dev_name(dev), host);
1323+
IRQF_ONESHOT, dev_name(dev), host);
13241324
if (ret)
13251325
return dev_err_probe(dev, ret, "failed to register irq\n");
13261326

0 commit comments

Comments
 (0)