From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796039068; b=nMrADLHZLOtngUsKdWu/2Vfqp/xxj5ThgpGYJ993SE52HrSYlKYHB3q/JlP73SuZUC9x 6plKAuPNms/bR68o1fxq3D0CJi597jQ6+5ojAun1XvasM3dh+9VeeiJjjCFhmiQDchQCu +tZzhFB9fYtovyDrQXHB9DWupIoGW5VXgbCDLFYIa4rG3U4J+Lkr4jUegqStmZcXQP7uC +qkAEBeQlAFPduRdNpqG/WychxvAbHnYhzixy/LP6QMv4ncw2MehV8LzoZ8iGTwrb1gpw 8w+skzMufHskLi6RDNtGamyM5XvSAbeIsgSrMmS/jNRMwETnxd4OoF0wYT2zVNZulMg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796039068; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=CCl1oySNtuNK0FtHZD3qe3FLhdLCVQW8vJndi9F5Bv0=; b=dnMgANNH8591VrnoThMAR86sKZYPout9CrZGMaP3dqEBNs8igzyjAd95O0Br6pqsI8PW OPam9f+/qlr3b84gCK3twSpJFEDNZSa3wO3AXu99mjwoqo4tfMB71xt4sXhs6QrzxB5SY ZwrzsRtKNqB0hjl69imLVxzk4eSlSB5qGkFzuT86MuOHaFALRE/J7A6tunCwX+JMhGIm2 Nz6q0eYV+zDh2X0ohx0swP8wKtvSe023GV4zUhtOSlvV9YQi1hFkK2N4yp05buvzA6Esp trETqEqfSiv4JdmssKA07m6AFymhm31vH0EfUCRoiZk9u4OY/FcQDa6Xphr/RSufvHw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OvUEm4s9; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id C8AAC606A31C; Mon, 30 Nov 2026 11:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OvUEm4s9 Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id B6ACF1F00898; Mon, 30 Nov 2026 11:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796039068; bh=CCl1oySNtuNK0FtHZD3qe3FLhdLCVQW8vJndi9F5Bv0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=OvUEm4s9jtjIFABdmxi2K20/qFmi7coCl+B6D9b+gQjeU0fcHg+mRBz2iU7Oy4N70 qN73kPkMpzRUFy0sl3y51y8IYtc7IAUYnCO4u3rz7s/6Q4yypFocyNgHlc9ShwGKYk CMDArR+WKHUoez3Pm5jvWoUcg4k9Bgq/JXh0qvszBH6leoQNGIzoN3S+HbJEkouBXX gBkjWpkrsAx8GHxSkFU0LHSttpXtzA1d45xt/EF7e8DwvHZywEKv96u3h6X/Ddgaj/ MPMfchKaRcP8PGHBLwWVv8QGgeh2psfA/9zm03Sj7nMl/q8SlkV8dzQVe8fQXenEvE djI7xpAyLEJ9A== Date: Mon, 30 Nov 2026 12:44:26 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Guangshuo Li Cc: Thierry Reding , Ed Blake , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH] pwm: img: stop using autosuspend on remove Message-ID: References: <20260918033017.3441183-1-lgs201920130244@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="v5emhtygp57xahn7" Content-Disposition: inline In-Reply-To: <20260918033017.3441183-1-lgs201920130244@gmail.com> --v5emhtygp57xahn7 Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] pwm: img: stop using autosuspend on remove MIME-Version: 1.0 Hello, [adding Rafael as expert on runtime PM] On Fri, Sep 18, 2026 at 11:30:17AM +0800, Guangshuo Li wrote: > img_pwm_probe() enables runtime PM autosuspend with > pm_runtime_use_autosuspend(). The probe failure path disables > autosuspend again, but the remove path only disables runtime PM. >=20 > As a result, the runtime PM autosuspend setting is left enabled after > the driver is unbound. >=20 > Call pm_runtime_dont_use_autosuspend() from img_pwm_remove() to undo > the setting established during probe, matching the probe error path > and the runtime PM API requirements. >=20 > This issue was found by manual code inspection. >=20 > Fixes: e690ae526216 ("pwm: img: Add runtime PM") > Cc: stable@vger.kernel.org > Signed-off-by: Guangshuo Li > --- > drivers/pwm/pwm-img.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c > index 91e0b19f0c08..c0747f5e0020 100644 > --- a/drivers/pwm/pwm-img.c > +++ b/drivers/pwm/pwm-img.c > @@ -339,6 +339,7 @@ static void img_pwm_remove(struct platform_device *pd= ev) > struct pwm_chip *chip =3D platform_get_drvdata(pdev); > =20 > pm_runtime_disable(&pdev->dev); > + pm_runtime_dont_use_autosuspend(&pdev->dev); What is the effect of not having that? It that relevant at all with runtime PM disabled? If the worst effect is that the device will have autosuspend enabled when it's probed the next time, I think it's fine to fix, but I'd drop the Cc: stable then. Would it make sense to let pm_runtime_disable() call pm_runtime_dont_use_autosuspend()? Best regards Uwe --v5emhtygp57xahn7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmsNYZcACgkQj4D7WH0S /k4FfQf/U1QUeSwysflQXloOcRtlg74jZ+N0pZq9nUTtzEstoMvOBUVMlyu3/PQ0 W0okfPxV8Oi5d31N/CTH3sbf7XMDR014qUKhrjeRS+wAvisZPf39+fy66JpjWfxQ O+VUbZVFIke7E4Qf8hQ3BQWfF6kO7w/pbZfCgkVO3PK7ouduz7T9tilvoLzKXzWD iWJweujY2Vmlw6praBv4ywMl/GW3MkFilUsRRkELd8PASzQ/lyJwDrngK+Tlukjj 0tGzDgqhVBvx4O5Xrjhf4Itwa6Xc1rkrGCxRg+0M3x0j7HbO/IO0+MFfYqj0nUOM +lJQTLybVD/mKWKrQHXAkkpzawSC9A== =EPp2 -----END PGP SIGNATURE----- --v5emhtygp57xahn7--