From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 425DC533580; Wed, 23 Sep 2026 14:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790173881; cv=none; b=Bl/88rd7aDuB3ywRgIbqSUMTYUH5w072p3CsIPL+MH8jKW/HDm1OgoGS7FZhJApVWEkWUqq978pn4xScuaHdOIFaqJgxKv+cgg4x1UuXTokbq1Xt9c4WaTr/cJxngtSf06nNnd7tXHImYlfpOPIYEYekTUFwXAxCaa9vWsqP8r4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790173881; c=relaxed/simple; bh=LGWEXuduP+lHa3jdEvOy9VwT1dFeBTOCD6JrpiP/6Ps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ayP6DJORMnXDpeyBN7XRSwYLdg+ic81k4yp+PKcC9ErMFL+3Ilazbjf4ffkBNAVdIxA0shUlIbIvNjrcl8ah+6iF33y5GQFiIHoz+8ICrWc2RHFiXDTD+yYWaTUBNdIUkuX+nvDYKoV0v+wU7zyPPMk959sBIJQGyC+Y+KoslkU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fQtXozUi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fQtXozUi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5006E1F000FF; Wed, 23 Sep 2026 14:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790173879; bh=c88PlwGRdJsDtGgj/CCBvjeMtnIiuUl4RBOaSdvqLrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fQtXozUi5ZT7+xwzsOUWx/c0AOtHB0AWWzg3HKsTEReGzl/aE4N2WGrdOJFoYXxdQ G7eeRJdZOmvT6MwFXaXiRAvL+yxokFzw5ROrJ5NphXrl4kpr7GDFgAc0C8gK+2SpgE jwI5TPCWimVWrND1g5e7iM/4pt/ov2ot/RN4dqeo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Frank Li , Andi Shyti Subject: [PATCH 7.2 329/438] i2c: imx: disable autosuspend on remove Date: Wed, 23 Sep 2026 16:05:50 +0200 Message-ID: <20260923140653.335546431@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923140644.756254324@linuxfoundation.org> References: <20260923140644.756254324@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guangshuo Li commit e0c3e9d76adbe522dd420a766ce42d03ce887c29 upstream. i2c_imx_probe() enables runtime PM autosuspend with pm_runtime_use_autosuspend(). The probe error path correctly undoes this setting with pm_runtime_dont_use_autosuspend(), but the normal remove path only disables runtime PM. The runtime PM API requires pm_runtime_use_autosuspend() to be undone with pm_runtime_dont_use_autosuspend() at driver exit unless runtime PM was enabled with devm_pm_runtime_enable(). Leaving the autosuspend flag set therefore leaves the runtime PM state incompletely cleaned up after the driver is unbound. Add the missing pm_runtime_dont_use_autosuspend() call to the remove path. This issue was found by manual code inspection. Fixes: 588eb93ea49f ("i2c: imx: add runtime pm support to improve the performance") Signed-off-by: Guangshuo Li Cc: # v4.5+ Reviewed-by: Frank Li Signed-off-by: Andi Shyti Link: https://patch.msgid.link/20260914091544.1667137-1-lgs201920130244@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-imx.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1922,6 +1922,7 @@ static void i2c_imx_remove(struct platfo pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); + pm_runtime_dont_use_autosuspend(&pdev->dev); } static int i2c_imx_runtime_suspend(struct device *dev)