]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: dwc2: also exit clock_gating when stopping udc while suspended
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Thu, 17 Apr 2025 17:40:17 +0000 (19:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 13:57:33 +0000 (15:57 +0200)
commit5cb3cb3db317c58d50b68f3ca3bb8343ea9d1acd
tree28be1128341b3618c04d46c6973c01203507c5ac
parentfd72dd6a82e206b71a15815e740a3dd34f49f9b8
usb: dwc2: also exit clock_gating when stopping udc while suspended

[ Upstream commit af076a41f8a28faf9ceb9dd2d88aef2c202ef39a ]

It is possible that the gadget will be disabled, while the udc is
suspended. When enabling the udc in that case, the clock gating
will not be enabled again. Leaving the phy unclocked. Even when the
udc is not enabled, connecting this powered but not clocked phy leads
to enumeration errors on the host side.

To ensure that the clock gating will be in an valid state, we ensure
that the clock gating will be enabled before stopping the udc.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Link: https://lore.kernel.org/r/20250417-dwc2_clock_gating-v1-1-8ea7c4d53d73@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc2/gadget.c