[PATCH v3] i2c: imx: mark I2C adapter when hardware is powered down
Mukesh Savaliya
mukesh.savaliya at oss.qualcomm.com
Thu May 21 00:40:07 PDT 2026
Hi Carlos,
On 5/20/2026 3:45 PM, Carlos Song (OSS) wrote:
> From: Carlos Song <carlos.song at nxp.com>
>
> Mark the I2C adapter as suspended during system suspend to block further
> transfers, and resume it on system resume. This prevents potential hangs
> when the hardware is powered down but clients still attempt I2C transfers.
>
Code changes looks fine to me but have comment on commit log.
It seems, you are adding support of _noirq() callbacks to allow
transfers during suspend/resume noirq phase of PM.
Would it make sense if you can write "Replace system PM callbacks with
noirq PM callbacks" OR "Allow transfers during _noirq phase of the PM
ops" instead of "mark I2C adapter when hardware is powered down" ?
> Fixes: 358025ac091e ("i2c: imx: make controller available until system suspend_noirq() and from resume_noirq()")
> Cc: stable at vger.kernel.org
> Signed-off-by: Carlos Song <carlos.song at nxp.com>
> ---
> Change for v3:
> - Add hrtimer_cancel in i2c_imx_suspend_noirq to cancel slave_timer for
> safe suspend in i2c slave mode.
> Change for v2:
> - Call i2c_mark_adapter_suspended() before pm_runtime_force_suspend()
> to prevent potential deadlock if a transfer is active during suspend.
> - Roll back with i2c_mark_adapter_resumed() if pm_runtime_force_suspend()
> fails.
> ---
[...]
More information about the linux-arm-kernel
mailing list