]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "usb: dwc3: qcom: Keep power domain on to retain controller status"
authorJohan Hovold <johan+linaro@kernel.org>
Thu, 4 Aug 2022 15:09:54 +0000 (17:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Aug 2022 17:33:40 +0000 (19:33 +0200)
commit63842cf0bac035c304c2ed9c0fd3e95efd92bde0
treedf14eb81e973f87e2075d0d1ee2c4e40706e7ab3
parent88c4b72fbf4e64ccb0093b345d149ca6fd6649a1
Revert "usb: dwc3: qcom: Keep power domain on to retain controller status"

This reverts commit e9a8eab67d203624cdf2409cbaa114ab46b22de8.

Generic power-domain flags must be set before the power-domain is
initialised and must specifically not be modified by drivers for devices
that happen to be in the domain.

To make sure that USB power-domains are left enabled during system
suspend when a device in the domain is in the wakeup path, the
GENPD_FLAG_ACTIVE_WAKEUP flag should instead be set for the domain
unconditionally when it is registered.

Note that this also avoids keeping power-domains on during suspend when
wakeup has not been enabled (e.g. through sysfs).

For the runtime PM case, making sure that the PHYs are not suspended and
that they are in the same domain as the controller prevents the domain
from being suspended. If there are cases where this is not possible or
desirable, the genpd implementation may need to be extended.

Fixes: e9a8eab67d20 ("usb: dwc3: qcom: Keep power domain on to retain controller status")
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220804151001.23612-3-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-qcom.c