]> 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)
commit1c8d0b5163f93b78df7b5966e4bd27c43e6dde30
treedf14eb81e973f87e2075d0d1ee2c4e40706e7ab3
parent5759aaf15cadbe693d93f4c5b27495b59dba6533
Revert "usb: dwc3: qcom: Keep power domain on to retain controller status"

This reverts commit d00fbaed356335d95de35914227b06859ecb5f7a.

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: d00fbaed3563 ("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