@@ -114,15 +114,19 @@ ZTEST(device_power_domain, test_device_power_domain)
114
114
/* Directly request the supported device multiple times */
115
115
pm_device_runtime_get (dev );
116
116
pm_device_runtime_get (dev );
117
+ pm_device_runtime_get (dev );
117
118
/* Directly release the supported device the first time, check all still powered */
118
119
pm_device_runtime_put (dev );
119
120
zassert_true (pm_device_is_powered (dev ), "" );
120
121
pm_device_state_get (dev , & state );
121
122
zassert_equal (PM_DEVICE_STATE_ACTIVE , state , "" );
122
123
pm_device_state_get (reg_1 , & state );
123
124
zassert_equal (PM_DEVICE_STATE_ACTIVE , state , "" );
124
- /* Directly release the supported device the second time, check all off */
125
- pm_device_runtime_put (dev );
125
+ /* Release the supported device the twice using async */
126
+ zassert_ok (pm_device_runtime_put_async (dev , K_SECONDS (1 )));
127
+ zassert_ok (pm_device_runtime_put_async (dev , K_SECONDS (1 )));
128
+ k_sleep (K_SECONDS (2 ));
129
+ /* Check all off */
126
130
zassert_false (pm_device_is_powered (dev ), "" );
127
131
pm_device_state_get (dev , & state );
128
132
zassert_equal (PM_DEVICE_STATE_OFF , state , "" );
0 commit comments