[PATCH v2 0/4] phy: freescale: fsl-samsung-hdmi: Fix runtime PM issues

Can Peng posted 4 patches 3 days, 18 hours ago
drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 32 +++++++++++++++-----
1 file changed, 25 insertions(+), 7 deletions(-)
[PATCH v2 0/4] phy: freescale: fsl-samsung-hdmi: Fix runtime PM issues
Posted by Can Peng 3 days, 18 hours ago
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