Re: [PATCH] i2c: xiic: restore runtime PM teardown in remove to fix clk WARN flood
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-i2c,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Thu, Aug 13, 2026 at 02:06:40PM -0700, Abdurrahman Hussain wrote:
> The devres conversion dropped the remove-time runtime PM trailer
> (pm_runtime_disable + pm_runtime_set_suspended +
> pm_runtime_dont_use_autosuspend). devm_pm_runtime_enable's release
> action then calls pm_runtime_dont_use_autosuspend() while runtime PM
> is still enabled, triggering an immediate runtime suspend: the suspend
> callback clk_disable()s the clock that the devm_clk_get_enabled()
> release is about to clk_disable_unprepare(), and every device teardown
> WARNs in clk_core_disable() ("clkN already disabled").
>
> Restore the trailer: with runtime PM disabled and the state forced to
> suspended before devres runs, the suspend callback cannot fire and the
> clock enable count stays balanced.
>
> Fixes: 50c63491ff26 ("i2c: xiic: switch to devres managed APIs")
> ---
^^^ Something went wrong. The SoB must be part of the official commit message.
Putting it under the cutter '---' line makes it disappear.
--
With Best Regards,
Andy Shevchenko