Re: [PATCH] i2c: microchip-corei2c: remove clients before disabling clock
From: Conor Dooley
Date: Tue Dec 01 2026 - 13:58:29 EST
On Sun, Nov 29, 2026 at 04:49:59PM +0400, Jiawen Liu wrote:
> mchp_corei2c_remove() disables the controller clock before removing the
> adapter. Adapter deletion synchronously invokes bound client remove
> callbacks, and those callbacks can issue transfers through their existing
> client handle.
>
> Keep the controller clock enabled while clients are removed, and disable
> it after client teardown has completed.
>
> Fixes: 64a6f1c4987e ("i2c: add support for microchip fpga i2c controllers")
> Signed-off-by: Jiawen Liu <1298662399@xxxxxx>
Acked-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
Cheers,
Conor.
> ---
> drivers/i2c/busses/i2c-microchip-corei2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-microchip-corei2c.c b/drivers/i2c/busses/i2c-microchip-corei2c.c
> index e5fa28f20228c..7e772893f4a4b 100644
> --- a/drivers/i2c/busses/i2c-microchip-corei2c.c
> +++ b/drivers/i2c/busses/i2c-microchip-corei2c.c
> @@ -620,8 +620,8 @@ static void mchp_corei2c_remove(struct platform_device *pdev)
> {
> struct mchp_corei2c_dev *idev = platform_get_drvdata(pdev);
>
> - clk_disable_unprepare(idev->i2c_clk);
> i2c_del_adapter(&idev->adapter);
> + clk_disable_unprepare(idev->i2c_clk);
> }
>
> static const struct of_device_id mchp_corei2c_of_match[] = {
> --
> 2.34.1
>
Attachment:
signature.asc
Description: PGP signature