Lines Matching full:device
8 #include <device.h>
30 * @brief Test cases to verify device objects
32 * Verify zephyr device driver apis with different device types
34 * @defgroup kernel_device_tests Device
42 * @brief Test device object binding
44 * Validates device binding for an existing and a non-existing device object.
45 * It creates a dummy_driver device object with basic init and configuration
49 * 1. A non-existing device object.
50 * 2. An existing device object with basic init and configuration information.
51 * 3. A failed init device object.
59 const struct device *dev; in test_dummy_device()
61 /* Validates device binding for a non-existing device object */ in test_dummy_device()
65 /* Validates device binding for an existing device object */ in test_dummy_device()
69 /* device_get_binding() returns false for device object in test_dummy_device()
77 * @brief Test device binding for existing device
79 * Validates device binding for an existing device object.
85 const struct device *mux; in test_dynamic_name()
94 * @brief Test device binding for non-existing device
96 * Validates binding of a random device driver(non-defined driver) named
103 const struct device *mux; in test_bogus_dynamic_name()
112 * @brief Test device binding for passing null name
114 * Validates device binding for device object when given dynamic name is null.
124 const struct device *mux; in test_null_dynamic_name()
155 static int pre1_fn(const struct device *dev) in pre1_fn()
161 static int pre2_fn(const struct device *dev) in pre2_fn()
166 static int post_fn(const struct device *dev) in post_fn()
171 static int app_fn(const struct device *dev) in app_fn()
182 static int null_driver_init(const struct device *dev) in null_driver_init()
225 * @brief Test system device list query API with PM enabled.
234 struct device const *devices; in test_build_suspend_device_list()
252 const struct device *dev; in test_enable_and_disable_automatic_runtime_pm()
263 TC_PRINT("Power management not supported on device"); in test_enable_and_disable_automatic_runtime_pm()
269 "Unable to get active state to device"); in test_enable_and_disable_automatic_runtime_pm()
273 zassert_not_null((dev->pm), "No device pm"); in test_enable_and_disable_automatic_runtime_pm()
282 * @brief Test device binding for existing device with PM enabled.
284 * Validates device binding for an existing device object with Power management
285 * enabled. It also checks if the device is in the middle of a transaction,
294 const struct device *dev; in test_dummy_device_pm()
304 /* Set device state to BUSY*/ in test_dummy_device_pm()
313 /* Clear device BUSY state*/ in test_dummy_device_pm()
321 /* Set device state to PM_DEVICE_STATE_ACTIVE */ in test_dummy_device_pm()
324 TC_PRINT("Power management not supported on device"); in test_dummy_device_pm()
330 "Unable to set active state to device"); in test_dummy_device_pm()
334 "Unable to get active state to device"); in test_dummy_device_pm()
338 /* Set device state to PM_DEVICE_STATE_SUSPENDED */ in test_dummy_device_pm()
341 zassert_true((ret == 0), "Unable to force suspend device"); in test_dummy_device_pm()
345 "Unable to get suspend state to device"); in test_dummy_device_pm()
373 * @brief Test initialization level for device driver instances
375 * @details After the defined device instances have initialized, we check the
399 * @brief Test initialization priorities for device driver instances
401 * details After the defined device instances have initialized, we check the
426 * @brief Test abstraction of device drivers with common functionalities
428 * @details Abstraction of device drivers with common functionalities
430 * and device drivers, where such interface is implemented by individual
431 * device drivers. We verify this by following step:
442 const struct device *dev; in test_abstraction_driver_common()
476 ztest_test_suite(device, in test_main()
492 ztest_run_test_suite(device); in test_main()