mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Guangshuo Li <lgs201920130244@gmail.com>,
	Dong Aisheng <aisheng.dong@nxp.com>,
	Andi Shyti <andi.shyti@kernel.org>, Frank Li <Frank.Li@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>, Wolfram Sang <wsa@kernel.org>,
	Fugang Duan <fugang.duan@nxp.com>,
	linux-i2c@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] i2c: imx-lpi2c: release clocks on remove
Date: Tue, 15 Sep 2026 13:07:36 +0200	[thread overview]
Message-ID: <ce7dc0c9-0764-4fb3-a7f5-a363514aebfb@kernel.org> (raw)
In-Reply-To: <20260914090718.1666333-1-lgs201920130244@gmail.com>

On 14/09/2026 11:07, Guangshuo Li wrote:
> lpi2c_imx_probe() prepares and enables the controller clocks before
> enabling runtime PM. After probe succeeds, clock management is handed
> over to the runtime PM callbacks.
> 
> However, lpi2c_imx_remove() only disables runtime PM and autosuspend.
> It does not ensure that the device is active before teardown or drop
> the clock references acquired during probe.
> 
> For platforms which do not require clock prepare/unprepare in the
> runtime PM callbacks, runtime suspend only disables the clocks, leaving
> the prepare references held for the lifetime of the driver. Since the
> remove path never unprepares them, these references are leaked when the
> driver is unbound.
> 
> For platforms which prepare and unprepare clocks during runtime PM, an
> unbind while the device is still runtime active can similarly leave
> the clock prepare and enable references outstanding.
> 
> Resume the device before disabling runtime PM so that the clocks are in
> a known enabled and prepared state. Then drop the temporary runtime PM
> reference and disable and unprepare the clocks during final teardown.
> Mark the device suspended after the hardware resources have been
> released.
> 
> This issue was found by manual code inspection.
> 
> Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>


Nothing improved, you again spammed with multiple independent patches so
maintainers would need to respond TO EACH one instead of to the thread.

Best regards,
Krzysztof

      reply	other threads:[~2026-09-15 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  9:07 Guangshuo Li
2026-09-15 11:07 ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce7dc0c9-0764-4fb3-a7f5-a363514aebfb@kernel.org \
    --to=krzk@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=andi.shyti@kernel.org \
    --cc=festevam@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=stable@vger.kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®