Commit 1ccd114e authored by Roy Luo's avatar Roy Luo
Browse files

UPSTREAM: usb: dwc3: core: Avoid redundant system suspend/resume callbacks



dwc3 device suspend/resume callbacks were being triggered during system
suspend and resume even if the device was already runtime-suspended.
This is redundant for device mode because the suspend and resume routines
are essentially identical for system PM and runtime PM.

To prevent these unnecessary callbacks, indicate to the PM core that it
can safely leave the device in runtime suspend if it's already
runtime-suspended in device mode by returning a positive value in
prepare() callback. This optimization only applies to devices without
pinctrl, as pinctrl has distinct logic tied to system suspend/resume.

Signed-off-by: default avatarRoy Luo <royluo@google.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20250312223434.3071598-1-royluo@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 394262559
Change-Id: If119cf8569105fe2f0d7613e932bd0db24ef4e07
(cherry picked from commit 850e6340)
Signed-off-by: default avatarRoy Luo <royluo@google.com>
parent bf0fb8bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment