[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230615-topic-sm8550-upstream-fix-spi-geni-qcom-probe-v1-1-6da9bf2db4a4@linaro.org>
Date: Thu, 15 Jun 2023 11:23:17 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Mark Brown <broonie@...nel.org>, Vinod Koul <vkoul@...nel.org>,
Dan Carpenter <error27@...il.com>
Cc: linux-arm-msm@...r.kernel.org, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Neil Armstrong <neil.armstrong@...aro.org>
Subject: [PATCH] spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from
dma_request_chan()
Now spi_geni_grab_gpi_chan() errors are correctly reported, the
-EPROBE_DEFER error should be returned from probe in case the
GPI dma driver is built as module and/or not probed yet.
Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma")
Fixes: 6532582c353f ("spi: spi-geni-qcom: fix error handling in spi_geni_grab_gpi_chan()")
Signed-off-by: Neil Armstrong <neil.armstrong@...aro.org>
---
drivers/spi/spi-geni-qcom.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 206cc04bb1ed..0ebcc5fe92de 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -661,7 +661,8 @@ static int spi_geni_init(struct spi_geni_master *mas)
geni_se_select_mode(se, GENI_GPI_DMA);
dev_dbg(mas->dev, "Using GPI DMA mode for SPI\n");
break;
- }
+ } else if (ret == -EPROBE_DEFER)
+ goto out_pm;
/*
* in case of failure to get gpi dma channel, we can still do the
* FIFO mode, so fallthrough
---
base-commit: 925294c9aa184801cc0a451b69a18dd0fe7d847d
change-id: 20230615-topic-sm8550-upstream-fix-spi-geni-qcom-probe-9a97cb6b5ea6
Best regards,
--
Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists