mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
spi: cadence-quadspi: Fix probe error path and logging
Merge series from Anurag Dutta <a-dutta@ti.com>: This series addresses issues in the cadence-quadspi driver's probe error path: Patch 1 fixes a clock disable imbalance that occurs when probe fails after runtime PM is enabled, particularly when DMA request returns -EPROBE_DEFER. Patch 2 adds proper error logging for DMA request failures using dev_err_probe() to improve diagnostics and handle probe deferral appropriately. logs : https://gist.github.com/anuragdutta731/59925cd11a50913b7128c88cd5394db7
This commit is contained in:
@@ -2001,8 +2001,10 @@ static int cqspi_probe(struct platform_device *pdev)
|
||||
|
||||
if (cqspi->use_direct_mode) {
|
||||
ret = cqspi_request_mmap_dma(cqspi);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
dev_err_probe(&pdev->dev, ret, "Failed to request mmap DMA\n");
|
||||
goto probe_setup_failed;
|
||||
}
|
||||
}
|
||||
|
||||
ret = spi_register_controller(host);
|
||||
@@ -2024,7 +2026,9 @@ static int cqspi_probe(struct platform_device *pdev)
|
||||
probe_reset_failed:
|
||||
if (cqspi->is_jh7110)
|
||||
cqspi_jh7110_disable_clk(pdev, cqspi);
|
||||
clk_disable_unprepare(cqspi->clk);
|
||||
|
||||
if (pm_runtime_get_sync(&pdev->dev) >= 0)
|
||||
clk_disable_unprepare(cqspi->clk);
|
||||
probe_clk_failed:
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user