milos-linux/drivers/reset
Tommaso Merciai b1b40ee008 reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime
commit 8889b289ce upstream.

The driver was disabling the USB2 PHY clock immediately after register
initialization in probe() and after each reset operation. This left the
PHY unclocked even though it must remain active for USB functionality.

The behavior appeared to work only when another driver
(e.g., USB controller) had already enabled the clock, making operation
unreliable and hardware-dependent. In configurations where this driver
is the sole clock user, USB functionality would fail.

Fix this by:
- Enabling the clock once in probe() via pm_runtime_resume_and_get()
- Removing all pm_runtime_put() calls from assert/deassert/status
- Registering a devm cleanup action to release the clock at removal
- Removed rzv2h_usbphy_assert_helper() and its call in
  rzv2h_usb2phy_reset_probe()

This ensures the PHY clock remains enabled for the entire device lifetime,
preventing instability and aligning with hardware requirements.

Cc: stable@vger.kernel.org
Fixes: e3911d7f86 ("reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P)")
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-07 06:13:52 +02:00
..
amlogic
hisilicon
spacemit reset: spacemit: k3: Decouple composite reset lines 2026-03-23 12:25:47 +01:00
starfive
sti
tegra
core.c reset: gpio: fix double free in reset_add_gpio_aux_device() error path 2026-03-23 12:18:41 +01:00
Kconfig reset: Create subdirectory for SpacemiT drivers 2026-01-24 16:53:02 +01:00
Makefile reset: Create subdirectory for SpacemiT drivers 2026-01-24 16:53:02 +01:00
reset-a10sr.c
reset-aspeed.c
reset-ath79.c
reset-axs10x.c
reset-bcm6345.c
reset-berlin.c
reset-brcmstb-rescal.c
reset-brcmstb.c
reset-eic7700.c
reset-eyeq.c
reset-gpio.c reset: gpio: check the return value of gpiod_set_value_cansleep() 2026-01-24 16:25:46 +01:00
reset-hsdk.c
reset-imx-scu.c
reset-imx7.c
reset-imx8mp-audiomix.c reset: imx8mp-audiomix: Support i.MX8ULP SIM LPAV 2026-01-24 16:22:49 +01:00
reset-intel-gw.c
reset-k210.c
reset-k230.c
reset-lantiq.c
reset-lpc18xx.c
reset-ma35d1.c
reset-microchip-sparx5.c
reset-mpfs.c
reset-npcm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
reset-pistachio.c
reset-qcom-aoss.c
reset-qcom-pdc.c
reset-raspberrypi.c
reset-rzg2l-usbphy-ctrl.c reset: rzg2l-usbphy-ctrl: Fix malformed MODULE_AUTHOR string 2026-03-20 11:15:49 +01:00
reset-rzv2h-usb2phy.c reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime 2026-05-07 06:13:52 +02:00
reset-scmi.c
reset-simple.c
reset-socfpga.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
reset-sunplus.c
reset-sunxi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
reset-th1520.c
reset-ti-sci.c
reset-ti-syscon.c
reset-tn48m.c
reset-tps380x.c
reset-uniphier-glue.c
reset-uniphier.c
reset-zynq.c
reset-zynqmp.c