Re: [PATCH v2] i2c: ocores: delete adapter before disabling controller
From: Peter Korsgaard
Date: Wed Nov 04 2026 - 05:20:33 EST
>>>>> "Matthias" == Matthias Goergens <matthias.goergens@xxxxxxxxx> writes:
> ocores_i2c_remove() clears the core's enable bits before it calls
> i2c_del_adapter(). Deleting the adapter removes its client devices,
> and some client drivers talk to their device while being removed:
> lm75_remove(), for example, tries to write the sensor's original
> configuration back. With the core disabled, such a transfer cannot
> work; in interrupt mode it times out after a second and the write is
> lost.
> Delete the adapter first, then disable the core.
> Sashiko, the AI review bot, pointed this out while reviewing an
> unrelated ocores patch.
> Link: https://lore.kernel.org/all/20260813153155.3953577-1-ruoyuw560@xxxxxxxxx/
> Link: https://sashiko.dev/#/patchset/20260813153155.3953577-1-ruoyuw560@xxxxxxxxx
> Fixes: 18f98b1e3147 ("[PATCH] i2c: New bus driver for the OpenCores I2C controller")
> Signed-off-by: Matthias Goergens <matthias.goergens@xxxxxxxxx>
Acked-by: Peter Korsgaard <peter@xxxxxxxxxxxxx>
--
Bye, Peter Korsgaard