* [PATCH 1/6] i2c: cadence: remove redundant pm_runtime_dont_use_autosuspend() call
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
@ 2026-11-09 20:50 ` Joshua Crofts
2026-11-09 20:50 ` [PATCH 2/6] i2c: img-scb: " Joshua Crofts
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Joshua Crofts @ 2026-11-09 20:50 UTC (permalink / raw)
To: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue
Cc: linux-arm-kernel, linux-i2c, linux-kernel, imx, linux-renesas-soc,
linux-stm32, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function call.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/i2c/busses/i2c-cadence.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 0c6887da47d1..8e65ea474a84 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -1628,7 +1628,6 @@ static void cdns_i2c_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
- pm_runtime_dont_use_autosuspend(&pdev->dev);
i2c_del_adapter(&id->adap);
clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
--
2.56.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/6] i2c: img-scb: remove redundant pm_runtime_dont_use_autosuspend() call
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-09 20:50 ` [PATCH 1/6] i2c: cadence: remove redundant pm_runtime_dont_use_autosuspend() call Joshua Crofts
@ 2026-11-09 20:50 ` Joshua Crofts
2026-11-09 20:50 ` [PATCH 3/6] i2c: imx: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Joshua Crofts @ 2026-11-09 20:50 UTC (permalink / raw)
To: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue
Cc: linux-arm-kernel, linux-i2c, linux-kernel, imx, linux-renesas-soc,
linux-stm32, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function call.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/i2c/busses/i2c-img-scb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index 9d2ee449a40b..9b7142bf0059 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1403,7 +1403,6 @@ static int img_i2c_probe(struct platform_device *pdev)
if (!pm_runtime_enabled(&pdev->dev))
img_i2c_runtime_suspend(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- pm_runtime_dont_use_autosuspend(&pdev->dev);
return ret;
}
--
2.56.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/6] i2c: imx: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-09 20:50 ` [PATCH 1/6] i2c: cadence: remove redundant pm_runtime_dont_use_autosuspend() call Joshua Crofts
2026-11-09 20:50 ` [PATCH 2/6] i2c: img-scb: " Joshua Crofts
@ 2026-11-09 20:50 ` Joshua Crofts
2026-11-12 3:33 ` Frank Li
2026-11-09 20:50 ` [PATCH 4/6] i2c: riic: " Joshua Crofts
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Joshua Crofts @ 2026-11-09 20:50 UTC (permalink / raw)
To: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue
Cc: linux-arm-kernel, linux-i2c, linux-kernel, imx, linux-renesas-soc,
linux-stm32, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function calls.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/i2c/busses/i2c-imx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 89f2b764bbc4..05906ddafbfa 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1964,7 +1964,6 @@ static int i2c_imx_probe(struct platform_device *pdev)
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
- pm_runtime_dont_use_autosuspend(&pdev->dev);
return ret;
}
@@ -1999,7 +1998,6 @@ static void i2c_imx_remove(struct platform_device *pdev)
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- pm_runtime_dont_use_autosuspend(&pdev->dev);
}
static int i2c_imx_runtime_suspend(struct device *dev)
--
2.56.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 3/6] i2c: imx: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 ` [PATCH 3/6] i2c: imx: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
@ 2026-11-12 3:33 ` Frank Li
0 siblings, 0 replies; 10+ messages in thread
From: Frank Li @ 2026-11-12 3:33 UTC (permalink / raw)
To: Joshua Crofts
Cc: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue, linux-arm-kernel, linux-i2c, linux-kernel, imx,
linux-renesas-soc, linux-stm32
On Mon, Nov 09, 2026 at 09:50:04PM +0100, Joshua Crofts wrote:
> Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
> driver core is now responsible for undoing any
> pm_runtime_use_autosuspend() calls on driver exit.
>
> Remove the redundant function calls.
>
> Signed-off-by: Joshua Crofts <crofts@kernel.org>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/i2c/busses/i2c-imx.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 89f2b764bbc4..05906ddafbfa 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -1964,7 +1964,6 @@ static int i2c_imx_probe(struct platform_device *pdev)
> pm_runtime_put_noidle(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> pm_runtime_set_suspended(&pdev->dev);
> - pm_runtime_dont_use_autosuspend(&pdev->dev);
> return ret;
> }
>
> @@ -1999,7 +1998,6 @@ static void i2c_imx_remove(struct platform_device *pdev)
>
> pm_runtime_put_noidle(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> - pm_runtime_dont_use_autosuspend(&pdev->dev);
> }
>
> static int i2c_imx_runtime_suspend(struct device *dev)
>
> --
> 2.56.0
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/6] i2c: riic: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
` (2 preceding siblings ...)
2026-11-09 20:50 ` [PATCH 3/6] i2c: imx: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
@ 2026-11-09 20:50 ` Joshua Crofts
2026-11-10 7:57 ` Geert Uytterhoeven
2026-11-09 20:50 ` [PATCH 5/6] i2c: stm32f7: " Joshua Crofts
2026-11-09 20:50 ` [PATCH 6/6] i2c: xiic: " Joshua Crofts
5 siblings, 1 reply; 10+ messages in thread
From: Joshua Crofts @ 2026-11-09 20:50 UTC (permalink / raw)
To: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue
Cc: linux-arm-kernel, linux-i2c, linux-kernel, imx, linux-renesas-soc,
linux-stm32, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function calls.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/i2c/busses/i2c-riic.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index 26b9d608fa28..57532dd2e3ea 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -591,7 +591,6 @@ static int riic_i2c_probe(struct platform_device *pdev)
out:
pm_runtime_disable(dev);
- pm_runtime_dont_use_autosuspend(dev);
return ret;
}
@@ -608,7 +607,6 @@ static void riic_i2c_remove(struct platform_device *pdev)
}
i2c_del_adapter(&riic->adapter);
pm_runtime_disable(dev);
- pm_runtime_dont_use_autosuspend(dev);
}
static const u8 riic_rz_a_regs[RIIC_REG_END] = {
--
2.56.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 4/6] i2c: riic: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 ` [PATCH 4/6] i2c: riic: " Joshua Crofts
@ 2026-11-10 7:57 ` Geert Uytterhoeven
0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2026-11-10 7:57 UTC (permalink / raw)
To: Joshua Crofts
Cc: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue, linux-arm-kernel, linux-i2c, linux-kernel, imx,
linux-renesas-soc, linux-stm32
On Mon, 9 Nov 2026 at 21:51, Joshua Crofts <crofts@kernel.org> wrote:
> Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
> driver core is now responsible for undoing any
> pm_runtime_use_autosuspend() calls on driver exit.
>
> Remove the redundant function calls.
>
> Signed-off-by: Joshua Crofts <crofts@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5/6] i2c: stm32f7: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
` (3 preceding siblings ...)
2026-11-09 20:50 ` [PATCH 4/6] i2c: riic: " Joshua Crofts
@ 2026-11-09 20:50 ` Joshua Crofts
2026-11-09 20:50 ` [PATCH 6/6] i2c: xiic: " Joshua Crofts
5 siblings, 0 replies; 10+ messages in thread
From: Joshua Crofts @ 2026-11-09 20:50 UTC (permalink / raw)
To: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue
Cc: linux-arm-kernel, linux-i2c, linux-kernel, imx, linux-renesas-soc,
linux-stm32, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function calls.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/i2c/busses/i2c-stm32f7.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 2e1cc6a92b81..7904d888550c 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2325,7 +2325,6 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
pm_runtime_put_noidle(i2c_dev->dev);
pm_runtime_disable(i2c_dev->dev);
pm_runtime_set_suspended(i2c_dev->dev);
- pm_runtime_dont_use_autosuspend(i2c_dev->dev);
if (i2c_dev->wakeup_src)
dev_pm_clear_wake_irq(i2c_dev->dev);
@@ -2367,7 +2366,6 @@ static void stm32f7_i2c_remove(struct platform_device *pdev)
pm_runtime_put_noidle(i2c_dev->dev);
pm_runtime_disable(i2c_dev->dev);
pm_runtime_set_suspended(i2c_dev->dev);
- pm_runtime_dont_use_autosuspend(i2c_dev->dev);
if (i2c_dev->dma) {
stm32_i2c_dma_free(i2c_dev->dma);
--
2.56.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 6/6] i2c: xiic: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
` (4 preceding siblings ...)
2026-11-09 20:50 ` [PATCH 5/6] i2c: stm32f7: " Joshua Crofts
@ 2026-11-09 20:50 ` Joshua Crofts
2026-11-09 20:59 ` sashiko-bot
5 siblings, 1 reply; 10+ messages in thread
From: Joshua Crofts @ 2026-11-09 20:50 UTC (permalink / raw)
To: Michal Simek, Andi Shyti, Oleksij Rempel, Pengutronix Kernel Team,
Frank Li, Sascha Hauer, Fabio Estevam, Chris Brandt,
Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
Alexandre Torgue
Cc: linux-arm-kernel, linux-i2c, linux-kernel, imx, linux-renesas-soc,
linux-stm32, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function calls.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/i2c/busses/i2c-xiic.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index ab7916745ad3..4e06fa4f73d7 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -1580,7 +1580,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)
err_pm_disable:
pm_runtime_disable(dev);
pm_runtime_set_suspended(dev);
- pm_runtime_dont_use_autosuspend(dev);
return ret;
}
@@ -1606,7 +1605,6 @@ static void xiic_i2c_remove(struct platform_device *pdev)
pm_runtime_disable(dev);
pm_runtime_put_noidle(dev);
pm_runtime_set_suspended(dev);
- pm_runtime_dont_use_autosuspend(dev);
}
static const struct dev_pm_ops xiic_dev_pm_ops = {
--
2.56.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 6/6] i2c: xiic: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-09 20:50 ` [PATCH 6/6] i2c: xiic: " Joshua Crofts
@ 2026-11-09 20:59 ` sashiko-bot
0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-11-09 20:59 UTC (permalink / raw)
To: Joshua Crofts; +Cc: imx, Frank.Li, wsa+renesas
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] i2c: xiic: premature IRQ registration in xiic_i2c_probe() [1]
--
commit 188337d85ab0ac1fad4560f785b36f1dce4f451f
Author: Joshua Crofts <crofts@kernel.org>
i2c: xiic: remove redundant pm_runtime_dont_use_autosuspend() calls
This commit removes redundant pm_runtime_dont_use_autosuspend() calls from
the probe error path and remove callback in the xiic I2C driver.
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index ab7916745ad39..4e06fa4f73d77 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c
> @@ -1580,7 +1580,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)
> err_pm_disable:
> pm_runtime_disable(dev);
> pm_runtime_set_suspended(dev);
> - pm_runtime_dont_use_autosuspend(dev);
>
> return ret;
> }
[Severity: High]
This problem wasn't introduced by this patch, but can registering the IRQ
in xiic_i2c_probe() before detecting hardware endianness cause an
interrupt storm [1]?
drivers/i2c/busses/i2c-xiic.c:xiic_i2c_probe() {
...
ret = request_threaded_irq(irq, NULL, xiic_process, IRQF_ONESHOT,
pdev->name, i2c);
if (ret)
goto err_pm_disable;
i2c->singlemaster = device_property_read_bool(dev, "single-master");
/*
* Detect endianness
* Try to reset the TX FIFO. Then check the EMPTY flag. If it is not
* set, assume that the endianness was wrong and swap.
*/
i2c->endianness = LITTLE;
xiic_setreg32(i2c, XIIC_CR_REG_OFFSET, XIIC_CR_TX_FIFO_RESET_MASK);
/* Reset is cleared in xiic_reinit */
sr = xiic_getreg32(i2c, XIIC_SR_REG_OFFSET);
if (!(sr & XIIC_SR_TX_FIFO_EMPTY_MASK))
i2c->endianness = BIG;
...
}
If a pending interrupt remains from an earlier boot stage on a big-endian
system, xiic_process() can fire immediately after request_threaded_irq()
while i2c->endianness is still zero-initialized to LITTLE. xiic_getreg32()
and xiic_setreg32() then use little-endian accessors, failing to clear the
interrupt and hanging the system in an unhandled IRQ storm. Detecting
endianness and running xiic_reinit() before requesting the IRQ would avoid
this.
[1] https://sashiko.dev/#/bug/linux-6466439c-c62b-471e-ba38-0219e368df95
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109-i2c-remove-dont-use-autosuspend-v1-0-49a08b8daf36@kernel.org?part=6
^ permalink raw reply [flat|nested] 10+ messages in thread