File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ static void uart_stm32_pm_policy_state_lock_get(const struct device *dev)
9696 if (!data -> pm_policy_state_on ) {
9797 data -> pm_policy_state_on = true;
9898 pm_policy_state_lock_get (PM_STATE_SUSPEND_TO_IDLE , PM_ALL_SUBSTATES );
99+ if (IS_ENABLED (CONFIG_PM_S2RAM )) {
100+ pm_policy_state_lock_get (PM_STATE_SUSPEND_TO_RAM , PM_ALL_SUBSTATES );
101+ }
99102 }
100103}
101104
@@ -106,6 +109,9 @@ static void uart_stm32_pm_policy_state_lock_put(const struct device *dev)
106109 if (data -> pm_policy_state_on ) {
107110 data -> pm_policy_state_on = false;
108111 pm_policy_state_lock_put (PM_STATE_SUSPEND_TO_IDLE , PM_ALL_SUBSTATES );
112+ if (IS_ENABLED (CONFIG_PM_S2RAM )) {
113+ pm_policy_state_lock_put (PM_STATE_SUSPEND_TO_RAM , PM_ALL_SUBSTATES );
114+ }
109115 }
110116}
111117#endif /* CONFIG_PM */
You can’t perform that action at this time.
0 commit comments