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=1796045504; b=jwByz3+g+R0ObEX0VNogtcpcMDKxWNCRA3R+Czd7QjLBh/x7uWNayw8DVrim+HRucW8J m+4m27395wBRnc+JaeHcN/VVi2MZXHCnPb/q4IhozXoE6JAH3oY30Sba2dqzdshjh0RSR sEznJHqhnaM0RwUltkBVXXW3tEV7o77KaSgld9lwQsTOcIfib3weEHBa9T9SRFD5poOkZ NHwMdbUYROT1VJc7G8gkNcGiLrfX+WZQIrP6XKxqJW0pubQe1Jz8/Y6uqy7UsNy40hJTV wrNevJza0kiDv5Ot+PP8vWZ8aD7JFRSC8qqmIn4LYb9ga56II9LPjG7n78oKmwWOLig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045504; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=bG/A6dvoHHy6A4htv3GEyyrEcoPqj1M2Hf6/Qwfdcqg=; b=0oBaWx40AtyfqUX/YD0nHcqeSEXnY5xBzbvlP3JOrbjikTWmyS3x779jO6lOk08VZMDY e0+m+Eat8F03yWrtcI1r6f8+5VUzMZwBxPMzVBVfn8+RE8JALkJv6a7Um/j5AUMzd8PY/ 21Qa5YfTxVtoo/tnEE7kTt9JD9SctF6o+PzEEs3ByAuYcLo6SHNmrB7N/D68AAkRf4gLT lw++RCWsQvkpGl4dierlel4RYbswLY+j5dY31Vgj4TgNS8jYkCfUuF70bDFVsQRjIsk4B ZrhX7t9Ixq2hKO2IfVm1qYPGD/tXcL8gIkJ3JpEtYuYVo6D2YgnIKp+QRDKiZbVL0jw== 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=cvu1p556; 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 BCEE7606A327; Mon, 30 Nov 2026 13:31:44 +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=cvu1p556 Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id 4CA4F1F00898; Mon, 30 Nov 2026 13:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796045504; bh=bG/A6dvoHHy6A4htv3GEyyrEcoPqj1M2Hf6/Qwfdcqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=cvu1p556O3FBrbr0yeSUPlao/tYZJ8U4I0DbjXEK+nrEdlMYX8LBFiX9CGLnFpgPy NyZ/+VLv1u1fUdh62Qn7j65hON3hLcAYRNKZKQPoFUzpsdu98CeM6bmTe9yaNFa+nm oABCFNYD4JSeGjcH1FpQ8XRuOI8ZkHIgFCaUkfanlyGL4IykWop28DoiXTmD7Hp6su Ik42BJZ2gThupdJywfqv9G5p0fOnp00xYUYXdudkL8XVcCLs6mcPgd+QdibvaIBJUU Hb+QaodpsJJBcOf/54VuJNw3zgwipHU8eVTE+yTz3tJ2Ch8UZSmhqYfqqaiA1Hlch/ lFVoXTU6Doq+g== Date: Mon, 30 Nov 2026 14:31:40 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Joshua Crofts Cc: ed.blake@sondrel.com, lgs201920130244@gmail.com, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, rafael@kernel.org, stable@vger.kernel.org, thierry.reding@gmail.com Subject: Re: [PATCH] pwm: img: stop using autosuspend on remove Message-ID: References: X-Mailing-List: stable@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="ovatolfwz3ifxgo2" Content-Disposition: inline In-Reply-To: --ovatolfwz3ifxgo2 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, On Mon, Nov 30, 2026 at 01:33:08PM +0100, Joshua Crofts wrote: > 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 *= pdev) > > struct pwm_chip *chip =3D platform_get_drvdata(pdev); > > =20 > > pm_runtime_disable(&pdev->dev); > > + pm_runtime_dont_use_autosuspend(&pdev->dev); >=20 > No need to add this as I added a change [1] that causes dont_use_autosusp= end() to > be called on driver exit. >=20 > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/co= mmit/?id=3Dd1706f9da9f40dffe8621cc0ee03b847f41f1d6d That sounds like the right thing to do. So I guess this patch can be replaced by one that drops pm_runtime_dont_use_autosuspend() from img_pwm_probe() then. Best regards Uwe --ovatolfwz3ifxgo2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmsNerkACgkQj4D7WH0S /k5xnAf/YayUWK0xBluRUgmX+cWNPezc902Y9J8g1391xSjfteCsNM2V8WHH/f6o D9cpyFHytCvsOMaARPpjtd15r3YtTH+beJAHKFJ7E9pcIoe/vfzTnK8Fz5B9ABC5 ZfGyb+72bbB99Smhx4CYb28ubaFXrgYIC/zQDfNpCEGYx1y0V5TdQ+ESe1Ahxe0y 1jEXSo9JbarvIcwk0b6yc0RWxU2ycJRbSngEGII2+cEiZIagJFQEJ+y4s9OyDJVQ dKVhvvIB4Xtac2tT4NviitOQlRPervJ618NZGxOYHCbs4z2oTxQv+JfsUCFfLsqV plv225JAT26iOw2t36GxpsxNNx9uJg== =Sfn4 -----END PGP SIGNATURE----- --ovatolfwz3ifxgo2--