MLK-21287 soc: imx: keep resource power ON if subdomain is wakeup source
The power mode operation ONLY checks whether the resource being powered OFF is a wakeup source, and skip power OFF operation if it is a wakeup source, but it does NOT consider the power tree status, if any of its children is a wakeup source, it needs to be kept powered ON for its children's wakeup capability. For example, on i.MX8QXP, CAN1 shares CAN0's power, if CAN1 is enabled as wakeup source, CAN0's power needs to be ON even it is NOT a wakeup source, this patch adds support for such scenario. As it uses recursion, to avoid overhead during runtime power management, introduce a variable to make sure this logic is ONLY enabled during suspend/resume. The generic power domain framework for handling device power according to wakeup status does NOT consider the virtual devices, e.g., if debug uart is enabled as wakeup source, the device wakeup capability check for uart device returns false, ONLY the ttydev has wakeup capability, that will cause resume_needed() return false and uart device power will be OFF even its child device "ttydev" is enabeld as wakeup source. Signed-off-by:Anson Huang <Anson.Huang@nxp.com> Tested-by:
Joakim Zhang <qiangqing.zhang@nxp.com> Reviewed-by:
Bai Ping <ping.bai@nxp.com>
Please register or sign in to comment