Lines Matching +full:driver +full:- +full:bar
4 * SPDX-License-Identifier: Apache-2.0
45 * Verify zephyr device driver apis with different device types
57 * Validates device binding for an existing and a non-existing device object.
61 * Validates three kinds situations of driver object:
62 * 1. A non-existing device object.
74 /* Validates device binding for a non-existing device object */ in ZTEST()
111 * @brief Test device binding for non-existing device
113 * Validates binding of a random device driver(non-defined driver) named
138 * lead to system crash in TrustZone enabled Non-Secure builds. in ZTEST_USER()
165 rp->pre_kernel = pre_kernel; in add_init_record()
166 rp->is_pre_kernel = k_is_pre_kernel(); in add_init_record()
167 rp->is_in_isr = k_is_in_isr(); in add_init_record()
168 rp->could_yield = k_can_yield(); in add_init_record()
200 /* This is an error case which driver initializes failed in SYS_INIT .*/
203 return -EINVAL; in null_driver_init()
219 zassert_equal(rp - init_records, 4U, in ZTEST()
222 while ((rp < rpe) && rp->pre_kernel) { in ZTEST()
223 zassert_equal(rp->is_in_isr, false, in ZTEST()
224 "rec %zu isr", rp - init_records); in ZTEST()
225 zassert_equal(rp->is_pre_kernel, true, in ZTEST()
226 "rec %zu pre-kernel", rp - init_records); in ZTEST()
227 zassert_equal(rp->could_yield, false, in ZTEST()
228 "rec %zu could-yield", rp - init_records); in ZTEST()
231 zassert_equal(rp - init_records, 2U, in ZTEST()
232 "bad pre-kernel count"); in ZTEST()
235 zassert_equal(rp->is_in_isr, false, in ZTEST()
236 "rec %zu isr", rp - init_records); in ZTEST()
237 zassert_equal(rp->is_pre_kernel, false, in ZTEST()
238 "rec %zu post-kernel", rp - init_records); in ZTEST()
239 zassert_equal(rp->could_yield, true, in ZTEST()
240 "rec %zu could-yield", rp - init_records); in ZTEST()
287 * @brief Test initialization level for device driver instances
290 * sequence number that each driver stored during initialization. If the
292 * means assigning the level for driver instance works.
314 * @brief Test initialization priorities for device driver instances
317 * sequence number that each driver stored during initialization. If the
319 * means assigning the priority for driver instance works.
341 * @brief Test initialization sub-priorities for device driver instances
344 * sequence number that each driver stored during initialization. If the
346 * means using the devicetree for sub-priority sorting works.
369 * 2. Define and create two driver instances.
371 * driver instance will call their own implementations.
380 int bar = 1; in ZTEST() local
383 /* verify driver A API has called */ in ZTEST()
387 ret = abstract_do_this(dev, foo, bar); in ZTEST()
388 zassert_true(ret == (foo + bar), "common API do_this fail"); in ZTEST()
393 /* verify driver B API has called */ in ZTEST()
397 ret = abstract_do_this(dev, foo, bar); in ZTEST()
398 zassert_true(ret == (foo - bar), "common API do_this fail"); in ZTEST()