Lines Matching full:domain
17 static const struct device *const domain = DEVICE_DT_GET(TEST_DOMAIN); variable
111 * @brief Test the power domain behavior
115 * - get + put multiple devices under a domain
116 * - notification when domain state changes
125 pm_device_init_suspended(domain); in ZTEST()
130 pm_device_runtime_enable(domain); in ZTEST()
135 ret = pm_device_power_domain_remove(devc, domain); in ZTEST()
138 ret = pm_device_power_domain_add(devc, domain); in ZTEST()
142 pm_device_state_get(domain, &state); in ZTEST()
154 /* Now test if "get" a device will resume the domain */ in ZTEST()
161 pm_device_state_get(domain, &state); in ZTEST()
174 * The domain has to still be active since device B in ZTEST()
177 pm_device_state_get(domain, &state); in ZTEST()
181 * Now the domain should be suspended since there is no in ZTEST()
190 pm_device_state_get(domain, &state); in ZTEST()
194 * With the domain suspended the device state should be OFF, since in ZTEST()
204 * Now lets test that devices are notified when the domain in ZTEST()
210 ret = pm_device_runtime_get(domain); in ZTEST()
216 ret = pm_device_runtime_put(domain); in ZTEST()
221 ret = pm_device_power_domain_remove(devc, domain); in ZTEST()
237 * @brief Test power domain requests are balanced
250 /* Init domain */ in ZTEST()
254 /* At this point domain should be SUSPENDED */ in ZTEST()
258 /* Get and put the device without PM enabled should not change the domain */ in ZTEST()
267 /* Same thing with the domain in active state */ in ZTEST()
284 zassert_true(device_is_ready(domain), "Device is not ready!"); in ZTEST()
289 pm_device_power_domain_remove(deva, domain); in ZTEST()
290 zassert_false(pm_device_on_power_domain(deva), "deva is in the power domain."); in ZTEST()
291 pm_device_power_domain_add(deva, domain); in ZTEST()
292 zassert_true(pm_device_on_power_domain(deva), "deva is not in the power domain."); in ZTEST()
294 pm_device_power_domain_add(devc, domain); in ZTEST()
295 zassert_true(pm_device_on_power_domain(devc), "devc is not in the power domain."); in ZTEST()
296 pm_device_power_domain_remove(devc, domain); in ZTEST()
297 zassert_false(pm_device_on_power_domain(devc), "devc in the power domain."); in ZTEST()