mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] spi: ti-qspi: three cleanups
@ 2026-11-04 14:08 Felix Gu
  2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

This series contains three small cleanups for drivers/spi/spi-ti-qspi.c.

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Felix Gu (3):
      spi: ti-qspi: Remove unbalanced runtime PM put on removal
      spi: ti-qspi: Abort probe when clock lookup fails
      spi: ti-qspi: Correct runtime PM error message

 drivers/spi/spi-ti-qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97
change-id: 20261104-ti-qspi-183f6801a837

Best regards,
--  
Felix Gu <ustc.gu@gmail.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
@ 2026-11-04 14:08 ` Felix Gu
  2026-11-04 14:08 ` [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails Felix Gu
  2026-11-04 14:08 ` [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message Felix Gu
  2 siblings, 0 replies; 4+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

The driver holds no runtime PM reference to release in remove().
Drop the extra pm_runtime_put_sync() to avoid usage counter underflow.

Fixes: e6b5140b7066 ("spi: ti-qspi: improve ->remove() callback")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-ti-qspi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 6908dc3621fd..0cc8c2d52226 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -913,7 +913,6 @@ static void ti_qspi_remove(struct platform_device *pdev)
 
 	spi_unregister_controller(qspi->host);
 
-	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 	ti_qspi_dma_cleanup(qspi);

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
  2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
@ 2026-11-04 14:08 ` Felix Gu
  2026-11-04 14:08 ` [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message Felix Gu
  2 siblings, 0 replies; 4+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

Return the clock lookup error instead of continuing with an error
pointer that subsequent transfers can pass to clk_get_rate().

Fixes: 505a14954e2d ("spi/qspi: Add qspi flash controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-ti-qspi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 0cc8c2d52226..2026fbcbeb90 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -844,6 +844,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
 	if (IS_ERR(qspi->fclk)) {
 		ret = PTR_ERR(qspi->fclk);
 		dev_err(&pdev->dev, "could not get clk: %d\n", ret);
+		return ret;
 	}
 
 	pm_runtime_use_autosuspend(&pdev->dev);

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
  2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
  2026-11-04 14:08 ` [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails Felix Gu
@ 2026-11-04 14:08 ` Felix Gu
  2 siblings, 0 replies; 4+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

Update the error message to name pm_runtime_resume_and_get() instead
of the previously used pm_runtime_get_sync().

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-ti-qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 2026fbcbeb90..c9fc0bf4b8fc 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -154,7 +154,7 @@ static int ti_qspi_setup(struct spi_device *spi)
 
 	ret = pm_runtime_resume_and_get(qspi->dev);
 	if (ret < 0) {
-		dev_err(qspi->dev, "pm_runtime_get_sync() failed\n");
+		dev_err(qspi->dev, "pm_runtime_resume_and_get() failed\n");
 		return ret;
 	}
 

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-04 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
2026-11-04 14:08 ` [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails Felix Gu
2026-11-04 14:08 ` [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message Felix Gu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®