aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-microchip-core-qspi.c
diff options
context:
space:
mode:
authorConor Dooley <[email protected]>2025-06-20 13:28:24 +0000
committerMark Brown <[email protected]>2025-06-23 20:33:53 +0000
commit76f03ce1c6f22805ecf689b1f3ecfb56582eddd5 (patch)
treea856ad764a7f90e1caa1c87f73dbe2b258b3e391 /drivers/spi/spi-microchip-core-qspi.c
parentLinux 6.16-rc3 (diff)
downloadkernel-76f03ce1c6f22805ecf689b1f3ecfb56582eddd5.tar.gz
kernel-76f03ce1c6f22805ecf689b1f3ecfb56582eddd5.zip
spi: microchip-core-qspi: set min_speed_hz during probe
The controller's minimum possible bus clock is 1/30 the rate of the input clock. Naively set the minimum bus clock speed the controller is capable of during probe, assuming that the rate will never reduce further. Signed-off-by: Conor Dooley <[email protected]> Link: https://patch.msgid.link/20250620-drained-widen-ac311bd5f172@spud Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-microchip-core-qspi.c')
-rw-r--r--drivers/spi/spi-microchip-core-qspi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-microchip-core-qspi.c b/drivers/spi/spi-microchip-core-qspi.c
index fa828fcaaef2..111ae6519ff4 100644
--- a/drivers/spi/spi-microchip-core-qspi.c
+++ b/drivers/spi/spi-microchip-core-qspi.c
@@ -562,6 +562,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev)
ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD |
SPI_TX_DUAL | SPI_TX_QUAD;
ctlr->dev.of_node = np;
+ ctlr->min_speed_hz = clk_get_rate(qspi->clk) / 30;
ret = devm_spi_register_controller(&pdev->dev, ctlr);
if (ret)