This is a note to let you know that I've just added the patch titled i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: i2c-xiic-fix-pm_runtime_set_suspended-with-runtime-p.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 076e01a303594486a83fc7524f404d54029ca638 Author: Jinjie Ruan <ruanjinjie@xxxxxxxxxx> Date: Mon Sep 23 11:42:50 2024 +0800 i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled [ Upstream commit 0c8d604dea437b69a861479b413d629bc9b3da70 ] It is not valid to call pm_runtime_set_suspended() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, call pm_runtime_disable() before to fix it. Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management") Cc: <stable@xxxxxxxxxxxxxxx> # v4.6+ Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx> Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 30839ead38361..e3a1fe8bbe25c 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -871,8 +871,8 @@ static int xiic_i2c_probe(struct platform_device *pdev) return 0; err_pm_disable: - pm_runtime_set_suspended(&pdev->dev); pm_runtime_disable(&pdev->dev); + pm_runtime_set_suspended(&pdev->dev); return ret; }