Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations
@ 2026-03-04 12:47 Felix Gu
  2026-03-04 12:47 ` [PATCH v2 1/3] spi: nxp-xspi: " Felix Gu
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Felix Gu @ 2026-03-04 12:47 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: linux-spi, imx, linux-kernel, Felix Gu

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Changes in v2:
- Fix Frank's comments.
- Fix for spi-nxp-fspi.c and spi-fsl-qspi.c suggested by Bough. 
- Link to v1: https://lore.kernel.org/r/20260303-spi-nxp-v1-1-b78570db28ce@gmail.com

---
Felix Gu (3):
      spi: nxp-xspi: Use reinit_completion() for repeated operations
      spi: nxp-fspi: Use reinit_completion() for repeated operations
      spi: fsl-qspi: Use reinit_completion() for repeated operations

 drivers/spi/spi-fsl-qspi.c | 3 ++-
 drivers/spi/spi-nxp-fspi.c | 3 ++-
 drivers/spi/spi-nxp-xspi.c | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
---
base-commit: d517cb8cea012f43b069617fc8179b45404f8018
change-id: 20260303-spi-nxp-d70b97a8df08

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


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

* [PATCH v2 1/3] spi: nxp-xspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations Felix Gu
@ 2026-03-04 12:47 ` Felix Gu
  2026-03-04 14:55   ` Frank Li
  2026-03-05  0:13   ` Han Xu
  2026-03-04 12:47 ` [PATCH v2 2/3] spi: nxp-fspi: " Felix Gu
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Felix Gu @ 2026-03-04 12:47 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: linux-spi, imx, linux-kernel, Felix Gu

The driver currently calls init_completion() during every spi_mem_op.
Tchnically it may work, but it's not the recommended pattern.

According to the kernel documentation: Calling init_completion() on
the same completion object twice is most likely a bug as it
re-initializes the queue to an empty queue and enqueued tasks
could get "lost" - use reinit_completion() in that case, but be
aware of other races.

So moves the initial initialization to probe function and uses
reinit_completion() for subsequent operations.

Fixes: 29c8c00d9f9d ("spi: add driver for NXP XSPI controller")
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-nxp-xspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-nxp-xspi.c b/drivers/spi/spi-nxp-xspi.c
index 06fcdf22990b..385302a6e62f 100644
--- a/drivers/spi/spi-nxp-xspi.c
+++ b/drivers/spi/spi-nxp-xspi.c
@@ -958,7 +958,7 @@ static int nxp_xspi_do_op(struct nxp_xspi *xspi, const struct spi_mem_op *op)
 		writel(reg, base + XSPI_RBCT);
 	}
 
-	init_completion(&xspi->c);
+	reinit_completion(&xspi->c);
 
 	/* Config the data address */
 	writel(op->addr.val + xspi->memmap_phy, base + XSPI_SFP_TG_SFAR);
@@ -1273,6 +1273,7 @@ static int nxp_xspi_probe(struct platform_device *pdev)
 
 	nxp_xspi_default_setup(xspi);
 
+	init_completion(&xspi->c);
 	ret = devm_request_irq(dev, irq,
 			nxp_xspi_irq_handler, 0, pdev->name, xspi);
 	if (ret)

-- 
2.43.0


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

* [PATCH v2 2/3] spi: nxp-fspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations Felix Gu
  2026-03-04 12:47 ` [PATCH v2 1/3] spi: nxp-xspi: " Felix Gu
@ 2026-03-04 12:47 ` Felix Gu
  2026-03-05  4:17   ` Hillf Danton
  2026-03-09  2:23   ` Bough Chen
  2026-03-04 12:47 ` [PATCH v2 3/3] spi: fsl-qspi: " Felix Gu
  2026-03-09 23:22 ` [PATCH v2 0/3] spi: nxp: " Mark Brown
  3 siblings, 2 replies; 11+ messages in thread
From: Felix Gu @ 2026-03-04 12:47 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: linux-spi, imx, linux-kernel, Felix Gu

The driver currently calls init_completion() during every spi_mem_op.
Tchnically it may work, but it's not the recommended pattern.

According to the kernel documentation: Calling init_completion() on
the same completion object twice is most likely a bug as it
re-initializes the queue to an empty queue and enqueued tasks
could get "lost" - use reinit_completion() in that case, but be
aware of other races.

So moves the initial initialization to probe function and uses
reinit_completion() for subsequent operations.

Fixes: a5356aef6a90 ("spi: spi-mem: Add driver for NXP FlexSPI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-nxp-fspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
index 320b3d93df57..1e36ae084dd8 100644
--- a/drivers/spi/spi-nxp-fspi.c
+++ b/drivers/spi/spi-nxp-fspi.c
@@ -996,7 +996,7 @@ static int nxp_fspi_do_op(struct nxp_fspi *f, const struct spi_mem_op *op)
 	reg = reg | FSPI_IPRXFCR_CLR;
 	fspi_writel(f, reg, base + FSPI_IPRXFCR);
 
-	init_completion(&f->c);
+	reinit_completion(&f->c);
 
 	fspi_writel(f, op->addr.val, base + FSPI_IPCR0);
 	/*
@@ -1365,6 +1365,7 @@ static int nxp_fspi_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return dev_err_probe(dev, ret, "Failed to disable clock");
 
+	init_completion(&f->c);
 	ret = devm_request_irq(dev, irq,
 			nxp_fspi_irq_handler, 0, pdev->name, f);
 	if (ret)

-- 
2.43.0


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

* [PATCH v2 3/3] spi: fsl-qspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations Felix Gu
  2026-03-04 12:47 ` [PATCH v2 1/3] spi: nxp-xspi: " Felix Gu
  2026-03-04 12:47 ` [PATCH v2 2/3] spi: nxp-fspi: " Felix Gu
@ 2026-03-04 12:47 ` Felix Gu
  2026-03-04 14:55   ` Frank Li
  2026-03-09  2:23   ` Bough Chen
  2026-03-09 23:22 ` [PATCH v2 0/3] spi: nxp: " Mark Brown
  3 siblings, 2 replies; 11+ messages in thread
From: Felix Gu @ 2026-03-04 12:47 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: linux-spi, imx, linux-kernel, Felix Gu

The driver currently calls init_completion() during every spi_mem_op.
Tchnically it may work, but it's not the recommended pattern.

According to the kernel documentation: Calling init_completion() on
the same completion object twice is most likely a bug as it
re-initializes the queue to an empty queue and enqueued tasks could
get "lost" - use reinit_completion() in that case, but be aware of
other races.

So moves the initial initialization to probe function and uses
reinit_completion() for subsequent operations.

Fixes: 84d043185dbe ("spi: Add a driver for the Freescale/NXP QuadSPI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-fsl-qspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
index a223b4bc6e63..57358851029b 100644
--- a/drivers/spi/spi-fsl-qspi.c
+++ b/drivers/spi/spi-fsl-qspi.c
@@ -633,7 +633,7 @@ static int fsl_qspi_do_op(struct fsl_qspi *q, const struct spi_mem_op *op)
 	void __iomem *base = q->iobase;
 	int err = 0;
 
-	init_completion(&q->c);
+	reinit_completion(&q->c);
 
 	/*
 	 * Always start the sequence at the same index since we update
@@ -965,6 +965,7 @@ static int fsl_qspi_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
+	init_completion(&q->c);
 	ret = devm_request_irq(dev, ret,
 			fsl_qspi_irq_handler, 0, pdev->name, q);
 	if (ret) {

-- 
2.43.0


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

* Re: [PATCH v2 1/3] spi: nxp-xspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 ` [PATCH v2 1/3] spi: nxp-xspi: " Felix Gu
@ 2026-03-04 14:55   ` Frank Li
  2026-03-05  0:13   ` Han Xu
  1 sibling, 0 replies; 11+ messages in thread
From: Frank Li @ 2026-03-04 14:55 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: Frank Li, linux-spi, imx, linux-kernel, Felix Gu

From: Frank Li (AI-BOT) <frank.li@nxp.com>

Typo in commit message:

> Tchnically it may work, but it's not the recommended pattern.

Should be "Technically" (missing 'e').

---

> So moves the initial initialization to probe function and uses

Should be "So move the initial initialization..." or "This moves the initial
initialization..." (subject-verb agreement).

---

AI bot review and may be useless.

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

* Re: [PATCH v2 3/3] spi: fsl-qspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 ` [PATCH v2 3/3] spi: fsl-qspi: " Felix Gu
@ 2026-03-04 14:55   ` Frank Li
  2026-03-09  2:23   ` Bough Chen
  1 sibling, 0 replies; 11+ messages in thread
From: Frank Li @ 2026-03-04 14:55 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: Frank Li, linux-spi, imx, linux-kernel, Felix Gu

From: Frank Li (AI-BOT) <frank.li@nxp.com>

Commit message has a typo:

> Tchnically it may work, but it's not the recommended pattern.

Should be "Technically".

Also, the placement of init_completion() in the probe function should come
before devm_request_irq(), since the IRQ handler may reference the
completion object. The current placement is correct, but consider adding a
comment explaining why the initialization must happen before IRQ
registration.

Otherwise the patch looks good.

AI bot review and may be useless.

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

* Re: [PATCH v2 1/3] spi: nxp-xspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 ` [PATCH v2 1/3] spi: nxp-xspi: " Felix Gu
  2026-03-04 14:55   ` Frank Li
@ 2026-03-05  0:13   ` Han Xu
  1 sibling, 0 replies; 11+ messages in thread
From: Han Xu @ 2026-03-05  0:13 UTC (permalink / raw)
  To: Felix Gu
  Cc: Haibo Chen, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf, linux-spi,
	imx, linux-kernel

On 26/03/04 08:47PM, Felix Gu wrote:
> 
> The driver currently calls init_completion() during every spi_mem_op.
> Tchnically it may work, but it's not the recommended pattern.

Typo, Technically.

> 
> According to the kernel documentation: Calling init_completion() on
> the same completion object twice is most likely a bug as it
> re-initializes the queue to an empty queue and enqueued tasks
> could get "lost" - use reinit_completion() in that case, but be
> aware of other races.
> 
> So moves the initial initialization to probe function and uses
> reinit_completion() for subsequent operations.
> 
> Fixes: 29c8c00d9f9d ("spi: add driver for NXP XSPI controller")
> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/spi/spi-nxp-xspi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-nxp-xspi.c b/drivers/spi/spi-nxp-xspi.c
> index 06fcdf22990b..385302a6e62f 100644
> --- a/drivers/spi/spi-nxp-xspi.c
> +++ b/drivers/spi/spi-nxp-xspi.c
> @@ -958,7 +958,7 @@ static int nxp_xspi_do_op(struct nxp_xspi *xspi, const struct spi_mem_op *op)
>                 writel(reg, base + XSPI_RBCT);
>         }
> 
> -       init_completion(&xspi->c);
> +       reinit_completion(&xspi->c);
> 
>         /* Config the data address */
>         writel(op->addr.val + xspi->memmap_phy, base + XSPI_SFP_TG_SFAR);
> @@ -1273,6 +1273,7 @@ static int nxp_xspi_probe(struct platform_device *pdev)
> 
>         nxp_xspi_default_setup(xspi);
> 
> +       init_completion(&xspi->c);
>         ret = devm_request_irq(dev, irq,
>                         nxp_xspi_irq_handler, 0, pdev->name, xspi);
>         if (ret)
> 
> --
> 2.43.0
> 

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

* Re: [PATCH v2 2/3] spi: nxp-fspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 ` [PATCH v2 2/3] spi: nxp-fspi: " Felix Gu
@ 2026-03-05  4:17   ` Hillf Danton
  2026-03-09  2:23   ` Bough Chen
  1 sibling, 0 replies; 11+ messages in thread
From: Hillf Danton @ 2026-03-05  4:17 UTC (permalink / raw)
  To: Felix Gu
  Cc: Han Xu, Haibo Chen, Mark Brown, Frank Li, Yogesh Narayan Gaur,
	linux-spi, imx, linux-kernel

On Wed, 04 Mar 2026 20:47:20 +0800 Felix Gu wrote:
> The driver currently calls init_completion() during every spi_mem_op.
> Tchnically it may work, but it's not the recommended pattern.
> 
> According to the kernel documentation: Calling init_completion() on
> the same completion object twice is most likely a bug as it
> re-initializes the queue to an empty queue and enqueued tasks
> could get "lost" - use reinit_completion() in that case, but be
> aware of other races.
> 
> So moves the initial initialization to probe function and uses
> reinit_completion() for subsequent operations.
> 
> Fixes: a5356aef6a90 ("spi: spi-mem: Add driver for NXP FlexSPI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/spi/spi-nxp-fspi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
> index 320b3d93df57..1e36ae084dd8 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -996,7 +996,7 @@ static int nxp_fspi_do_op(struct nxp_fspi *f, const struct spi_mem_op *op)
>  	reg = reg | FSPI_IPRXFCR_CLR;
>  	fspi_writel(f, reg, base + FSPI_IPRXFCR);
>  
> -	init_completion(&f->c);
> +	reinit_completion(&f->c);
>  
>  	fspi_writel(f, op->addr.val, base + FSPI_IPCR0);
>  	/*
> @@ -1365,6 +1365,7 @@ static int nxp_fspi_probe(struct platform_device *pdev)
>  	if (ret < 0)
>  		return dev_err_probe(dev, ret, "Failed to disable clock");
>  
> +	init_completion(&f->c);
>  	ret = devm_request_irq(dev, irq,
>  			nxp_fspi_irq_handler, 0, pdev->name, f);
>  	if (ret)
> 
> -- 
> 2.43.0
> 
After this work relevant code in nxp_fspi_exec_op() looks like

	guard(mutex)(&f->lock);
	nxp_fspi_do_op()
	  reinit_completion(&f->c);
	  /* Wait for the interrupt. */
	  if (!wait_for_completion_timeout(&f->c, msecs_to_jiffies(1000)))
		err = -ETIMEDOUT;

and if __no__ interrupt could fire after the 1000ms timeout, no reinit is
needed at all. Otherwise reinit alone fails to work.

Important is -- show the evidence that no chance is left for the timeout.

BTW the same applies to other patches in this series?

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

* RE: [PATCH v2 2/3] spi: nxp-fspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 ` [PATCH v2 2/3] spi: nxp-fspi: " Felix Gu
  2026-03-05  4:17   ` Hillf Danton
@ 2026-03-09  2:23   ` Bough Chen
  1 sibling, 0 replies; 11+ messages in thread
From: Bough Chen @ 2026-03-09  2:23 UTC (permalink / raw)
  To: Felix Gu, Han Xu, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org

> -----Original Message-----
> From: Felix Gu <ustc.gu@gmail.com>
> Sent: 2026年3月4日 20:47
> To: Han Xu <han.xu@nxp.com>; Bough Chen <haibo.chen@nxp.com>; Mark
> Brown <broonie@kernel.org>; Frank Li <frank.li@nxp.com>; Yogesh Gaur
> <yogeshgaur.83@gmail.com>; Yogesh Narayan Gaur
> <yogeshnarayan.gaur@nxp.com>; Boris Brezillon <bbrezillon@kernel.org>;
> Frieder Schrempf <frieder.schrempf@kontron.de>
> Cc: linux-spi@vger.kernel.org; imx@lists.linux.dev; linux-kernel@vger.kernel.org;
> Felix Gu <ustc.gu@gmail.com>
> Subject: [PATCH v2 2/3] spi: nxp-fspi: Use reinit_completion() for repeated
> operations
> 
> The driver currently calls init_completion() during every spi_mem_op.
> Tchnically it may work, but it's not the recommended pattern.
> 
> According to the kernel documentation: Calling init_completion() on the same
> completion object twice is most likely a bug as it re-initializes the queue to an
> empty queue and enqueued tasks could get "lost" - use reinit_completion() in
> that case, but be aware of other races.
> 
> So moves the initial initialization to probe function and uses
> reinit_completion() for subsequent operations.

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>

Regards
Haibo Chen
> 
> Fixes: a5356aef6a90 ("spi: spi-mem: Add driver for NXP FlexSPI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/spi/spi-nxp-fspi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index
> 320b3d93df57..1e36ae084dd8 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -996,7 +996,7 @@ static int nxp_fspi_do_op(struct nxp_fspi *f, const struct
> spi_mem_op *op)
>  	reg = reg | FSPI_IPRXFCR_CLR;
>  	fspi_writel(f, reg, base + FSPI_IPRXFCR);
> 
> -	init_completion(&f->c);
> +	reinit_completion(&f->c);
> 
>  	fspi_writel(f, op->addr.val, base + FSPI_IPCR0);
>  	/*
> @@ -1365,6 +1365,7 @@ static int nxp_fspi_probe(struct platform_device
> *pdev)
>  	if (ret < 0)
>  		return dev_err_probe(dev, ret, "Failed to disable clock");
> 
> +	init_completion(&f->c);
>  	ret = devm_request_irq(dev, irq,
>  			nxp_fspi_irq_handler, 0, pdev->name, f);
>  	if (ret)
> 
> --
> 2.43.0


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

* RE: [PATCH v2 3/3] spi: fsl-qspi: Use reinit_completion() for repeated operations
  2026-03-04 12:47 ` [PATCH v2 3/3] spi: fsl-qspi: " Felix Gu
  2026-03-04 14:55   ` Frank Li
@ 2026-03-09  2:23   ` Bough Chen
  1 sibling, 0 replies; 11+ messages in thread
From: Bough Chen @ 2026-03-09  2:23 UTC (permalink / raw)
  To: Felix Gu, Han Xu, Mark Brown, Frank Li, Yogesh Gaur,
	Yogesh Narayan Gaur, Boris Brezillon, Frieder Schrempf
  Cc: linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org

> -----Original Message-----
> From: Felix Gu <ustc.gu@gmail.com>
> Sent: 2026年3月4日 20:47
> To: Han Xu <han.xu@nxp.com>; Bough Chen <haibo.chen@nxp.com>; Mark
> Brown <broonie@kernel.org>; Frank Li <frank.li@nxp.com>; Yogesh Gaur
> <yogeshgaur.83@gmail.com>; Yogesh Narayan Gaur
> <yogeshnarayan.gaur@nxp.com>; Boris Brezillon <bbrezillon@kernel.org>;
> Frieder Schrempf <frieder.schrempf@kontron.de>
> Cc: linux-spi@vger.kernel.org; imx@lists.linux.dev; linux-kernel@vger.kernel.org;
> Felix Gu <ustc.gu@gmail.com>
> Subject: [PATCH v2 3/3] spi: fsl-qspi: Use reinit_completion() for repeated
> operations
> 
> The driver currently calls init_completion() during every spi_mem_op.
> Tchnically it may work, but it's not the recommended pattern.
> 
> According to the kernel documentation: Calling init_completion() on the same
> completion object twice is most likely a bug as it re-initializes the queue to an
> empty queue and enqueued tasks could get "lost" - use reinit_completion() in
> that case, but be aware of other races.
> 
> So moves the initial initialization to probe function and uses
> reinit_completion() for subsequent operations.

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>

Regards
Haibo Chen
>
> 
> Fixes: 84d043185dbe ("spi: Add a driver for the Freescale/NXP QuadSPI
> controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/spi/spi-fsl-qspi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c index
> a223b4bc6e63..57358851029b 100644
> --- a/drivers/spi/spi-fsl-qspi.c
> +++ b/drivers/spi/spi-fsl-qspi.c
> @@ -633,7 +633,7 @@ static int fsl_qspi_do_op(struct fsl_qspi *q, const struct
> spi_mem_op *op)
>  	void __iomem *base = q->iobase;
>  	int err = 0;
> 
> -	init_completion(&q->c);
> +	reinit_completion(&q->c);
> 
>  	/*
>  	 * Always start the sequence at the same index since we update @@
> -965,6 +965,7 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>  	if (ret < 0)
>  		return ret;
> 
> +	init_completion(&q->c);
>  	ret = devm_request_irq(dev, ret,
>  			fsl_qspi_irq_handler, 0, pdev->name, q);
>  	if (ret) {
> 
> --
> 2.43.0


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

* Re: [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations
  2026-03-04 12:47 [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations Felix Gu
                   ` (2 preceding siblings ...)
  2026-03-04 12:47 ` [PATCH v2 3/3] spi: fsl-qspi: " Felix Gu
@ 2026-03-09 23:22 ` Mark Brown
  3 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2026-03-09 23:22 UTC (permalink / raw)
  To: Han Xu, Haibo Chen, Frank Li, Yogesh Gaur, Yogesh Narayan Gaur,
	Boris Brezillon, Frieder Schrempf, Felix Gu
  Cc: linux-spi, imx, linux-kernel

On Wed, 04 Mar 2026 20:47:18 +0800, Felix Gu wrote:
> 


Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/3] spi: nxp-xspi: Use reinit_completion() for repeated operations
      commit: 40f9bc646db5aa89fb85f2cda1e55a2bf9d6a30c
[2/3] spi: nxp-fspi: Use reinit_completion() for repeated operations
      commit: 68c8c93fdb0de7e528dc3dfb1d17eb0f652259b8
[3/3] spi: fsl-qspi: Use reinit_completion() for repeated operations
      commit: 981b080a79724738882b0af1c5bb7ade30d94f24

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2026-03-09 23:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 12:47 [PATCH v2 0/3] spi: nxp: Use reinit_completion() for repeated operations Felix Gu
2026-03-04 12:47 ` [PATCH v2 1/3] spi: nxp-xspi: " Felix Gu
2026-03-04 14:55   ` Frank Li
2026-03-05  0:13   ` Han Xu
2026-03-04 12:47 ` [PATCH v2 2/3] spi: nxp-fspi: " Felix Gu
2026-03-05  4:17   ` Hillf Danton
2026-03-09  2:23   ` Bough Chen
2026-03-04 12:47 ` [PATCH v2 3/3] spi: fsl-qspi: " Felix Gu
2026-03-04 14:55   ` Frank Li
2026-03-09  2:23   ` Bough Chen
2026-03-09 23:22 ` [PATCH v2 0/3] spi: nxp: " Mark Brown

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