Re: [PATCH] i2c: imx-lpi2c: make controller available until the system enters suspend_noirq() and from resume_noirq().

From: Andi Shyti
Date: Tue Jan 07 2025 - 18:21:50 EST


Hi Carlos,

On Fri, Dec 27, 2024 at 04:47:36PM +0800, Carlos Song wrote:
> This is a general i2c controller feature. Some I2C devices may need the
> I2C controller to remain active during resume_noirq() or suspend_noirq().
> If the controller is autosuspended, there is no way to wake it up once
> runtime PM disabled (in suspend_late()). During system resume, the I2C
> controller will be available only after runtime PM is re-enabled
> (in resume_early()). However, this may be too late for some devices.
>
> Wake up the controller in the suspend() callback while runtime PM is
> still enabled. The I2C controller will remain available until the
> suspend_noirq() callback (pm_runtime_force_suspend()) is called. During
> resume, the I2C controller can be restored by the resume_noirq() callback
> (pm_runtime_force_resume()). Finally, the resume() callback re-enables
> autosuspend. As a result, the I2C controller can remain available until
> the system enters suspend_noirq() and from resume_noirq().
>
> Signed-off-by: Carlos Song <carlos.song@xxxxxxx>

Merged to i2c/i2c-host.

Thanks,
Andi