Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] phy: freescale: fsl-samsung-hdmi: Fix runtime PM issues
@ 2026-07-21  6:47 Can Peng
  2026-07-21  6:47 ` [PATCH v2 1/4] phy: freescale: fsl-samsung-hdmi: Fix runtime PM cleanup Can Peng
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Can Peng @ 2026-07-21  6:47 UTC (permalink / raw)
  To: vkoul, neil.armstrong, bmasney; +Cc: linux-phy, linux-kernel, Can Peng

Hi,

v1 fixed runtime PM cleanup when PHY clock registration fails. During
review, additional runtime PM and clock lifetime issues were pointed out
in the same driver:

- the APB clock can be disabled twice on remove if the device is runtime
  suspended;
- the PHY clock .set_rate() path can access registers after the provider
  device has been runtime suspended;
- runtime resume can leak the APB clock enable count if PHY
  reconfiguration fails.

This v2 keeps the original cleanup fix and adds targeted fixes for the
other cases.

The PHY clock is registered after runtime PM is enabled, so the common
clock framework takes a runtime PM reference on the provider device
before invoking the rate callbacks. Patch 3 keeps the APB clock prepared
for the lifetime of the device and only gates it in runtime PM callbacks,
which makes the provider resume path safe while rate callbacks access
PHY registers.

Changes in v2:
- Expand the original single patch into a four-patch series.
- Add fixes for the remove-time APB clock underflow, CCF .set_rate()
  runtime PM path and runtime-resume error unwind reported during
  review.
- Link to v1: 
  https://lore.kernel.org/all/20260718071816.437047-1-pengcan@kylinos.cn/

Can Peng (4):
  phy: freescale: fsl-samsung-hdmi: Fix runtime PM cleanup
  phy: freescale: fsl-samsung-hdmi: Resume device on remove
  phy: freescale: fsl-samsung-hdmi: Only gate APB clock in runtime PM
  phy: freescale: fsl-samsung-hdmi: Disable APB clock on resume failure

 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 32 +++++++++++++++-----
 1 file changed, 25 insertions(+), 7 deletions(-)

-- 
2.53.0

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-21  7:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21  6:47 [PATCH v2 0/4] phy: freescale: fsl-samsung-hdmi: Fix runtime PM issues Can Peng
2026-07-21  6:47 ` [PATCH v2 1/4] phy: freescale: fsl-samsung-hdmi: Fix runtime PM cleanup Can Peng
2026-07-21  6:47 ` [PATCH v2 2/4] phy: freescale: fsl-samsung-hdmi: Resume device on remove Can Peng
2026-07-21  6:47 ` [PATCH v2 3/4] phy: freescale: fsl-samsung-hdmi: Only gate APB clock in runtime PM Can Peng
2026-07-21  6:47 ` [PATCH v2 4/4] phy: freescale: fsl-samsung-hdmi: Disable APB clock on resume failure Can Peng
2026-07-21  7:01   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox