Lines Matching refs:dev

32 static int testprobe_drv_probe(struct udevice *dev)  in testprobe_drv_probe()  argument
34 struct dm_testprobe_pdata *pdata = dev_get_plat(dev); in testprobe_drv_probe()
67 static int testdevres_drv_bind(struct udevice *dev) in testdevres_drv_bind() argument
69 struct dm_testdevres_pdata *pdata = dev_get_plat(dev); in testdevres_drv_bind()
71 pdata->ptr = devm_kmalloc(dev, TEST_DEVRES_SIZE, 0); in testdevres_drv_bind()
76 static int testdevres_drv_of_to_plat(struct udevice *dev) in testdevres_drv_of_to_plat() argument
78 struct dm_testdevres_priv *priv = dev_get_priv(dev); in testdevres_drv_of_to_plat()
80 priv->ptr_ofdata = devm_kmalloc(dev, TEST_DEVRES_SIZE3, 0); in testdevres_drv_of_to_plat()
85 static int testdevres_drv_probe(struct udevice *dev) in testdevres_drv_probe() argument
87 struct dm_testdevres_priv *priv = dev_get_priv(dev); in testdevres_drv_probe()
89 priv->ptr = devm_kmalloc(dev, TEST_DEVRES_SIZE2, 0); in testdevres_drv_probe()
118 struct udevice *dev; in dm_check_devices() local
129 ret = uclass_get_device(UCLASS_TEST_FDT, i, &dev); in dm_check_devices()
138 base = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), in dm_check_devices()
141 fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL)); in dm_check_devices()
143 ut_assert(!dm_check_operations(uts, dev, base, in dm_check_devices()
144 dev_get_priv(dev))); in dm_check_devices()
154 struct udevice *dev; in dm_test_fdt() local
170 ret = uclass_find_device(UCLASS_TEST_FDT, i, &dev); in dm_test_fdt()
172 ut_assert(!dev_get_priv(dev)); in dm_test_fdt()
173 ut_assert(dev_get_plat(dev)); in dm_test_fdt()
230 struct udevice *dev; in dm_test_fdt_uclass_seq() local
233 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 3, &dev)); in dm_test_fdt_uclass_seq()
234 ut_asserteq_str("b-test", dev->name); in dm_test_fdt_uclass_seq()
235 ut_asserteq(3, dev_seq(dev)); in dm_test_fdt_uclass_seq()
237 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 8, &dev)); in dm_test_fdt_uclass_seq()
238 ut_asserteq_str("a-test", dev->name); in dm_test_fdt_uclass_seq()
239 ut_asserteq(8, dev_seq(dev)); in dm_test_fdt_uclass_seq()
245 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 13, &dev)); in dm_test_fdt_uclass_seq()
246 ut_asserteq_str("d-test", dev->name); in dm_test_fdt_uclass_seq()
247 ut_asserteq(13, dev_seq(dev)); in dm_test_fdt_uclass_seq()
250 &dev)); in dm_test_fdt_uclass_seq()
251 ut_asserteq_ptr(NULL, dev); in dm_test_fdt_uclass_seq()
254 ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 6, &dev)); in dm_test_fdt_uclass_seq()
255 ut_asserteq_str("e-test", dev->name); in dm_test_fdt_uclass_seq()
256 ut_asserteq(6, dev_seq(dev)); in dm_test_fdt_uclass_seq()
262 ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 3, &dev)); in dm_test_fdt_uclass_seq()
263 ut_asserteq_str("b-test", dev->name); in dm_test_fdt_uclass_seq()
264 ut_asserteq(3, dev_seq(dev)); in dm_test_fdt_uclass_seq()
270 ut_assertok(uclass_get_device(UCLASS_TEST_FDT, 2, &dev)); in dm_test_fdt_uclass_seq()
271 ut_asserteq_str("d-test", dev->name); in dm_test_fdt_uclass_seq()
272 ut_asserteq(13, dev_seq(dev)); in dm_test_fdt_uclass_seq()
275 ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 15, &dev)); in dm_test_fdt_uclass_seq()
276 ut_asserteq_str("g-test", dev->name); in dm_test_fdt_uclass_seq()
277 ut_asserteq(15, dev_seq(dev)); in dm_test_fdt_uclass_seq()
281 &dev)); in dm_test_fdt_uclass_seq()
283 &dev)); in dm_test_fdt_uclass_seq()
285 &dev)); in dm_test_fdt_uclass_seq()
287 &dev)); in dm_test_fdt_uclass_seq()
289 &dev)); in dm_test_fdt_uclass_seq()
291 &dev)); in dm_test_fdt_uclass_seq()
293 &dev)); in dm_test_fdt_uclass_seq()
295 &dev)); in dm_test_fdt_uclass_seq()
304 struct udevice *dev; in dm_test_fdt_uclass_seq_manual() local
310 ut_assertok(uclass_get_device(UCLASS_TEST_FDT_MANUAL, 0, &dev)); in dm_test_fdt_uclass_seq_manual()
311 ut_asserteq_str("testfdtm0", dev->name); in dm_test_fdt_uclass_seq_manual()
312 ut_asserteq(-1, dev_seq(dev)); in dm_test_fdt_uclass_seq_manual()
314 ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT_MANUAL, 1, &dev)); in dm_test_fdt_uclass_seq_manual()
315 ut_asserteq_str("testfdtm1", dev->name); in dm_test_fdt_uclass_seq_manual()
316 ut_asserteq(1, dev_seq(dev)); in dm_test_fdt_uclass_seq_manual()
318 ut_assertok(uclass_get_device(UCLASS_TEST_FDT_MANUAL, 2, &dev)); in dm_test_fdt_uclass_seq_manual()
319 ut_asserteq_str("testfdtm2", dev->name); in dm_test_fdt_uclass_seq_manual()
320 ut_asserteq(-1, dev_seq(dev)); in dm_test_fdt_uclass_seq_manual()
328 struct udevice *dev; in dm_test_fdt_uclass_seq_more() local
334 "c-test@1", NULL, node, &dev)); in dm_test_fdt_uclass_seq_more()
335 ut_asserteq(12, dev_seq(dev)); in dm_test_fdt_uclass_seq_more()
336 ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 12, &dev)); in dm_test_fdt_uclass_seq_more()
337 ut_asserteq_str("c-test@1", dev->name); in dm_test_fdt_uclass_seq_more()
354 "fred", NULL, ofnode_null(), &dev)); in dm_test_fdt_uclass_seq_more()
355 ut_asserteq(19, dev_seq(dev)); in dm_test_fdt_uclass_seq_more()
358 "fred2", NULL, ofnode_null(), &dev)); in dm_test_fdt_uclass_seq_more()
359 ut_asserteq(20, dev_seq(dev)); in dm_test_fdt_uclass_seq_more()
369 struct udevice *dev; in dm_test_fdt_offset() local
375 &dev)); in dm_test_fdt_offset()
376 ut_asserteq_str("e-test", dev->name); in dm_test_fdt_offset()
382 node, &dev)); in dm_test_fdt_offset()
388 node, &dev)); in dm_test_fdt_offset()
402 struct udevice *dev, *parent = NULL; in dm_test_first_next_device() local
407 for (ret = uclass_first_device(UCLASS_TEST_PROBE, &dev), count = 0; in dm_test_first_next_device()
408 dev; in dm_test_first_next_device()
409 ret = uclass_next_device(&dev)) { in dm_test_first_next_device()
411 parent = dev_get_parent(dev); in dm_test_first_next_device()
417 ut_assertok(uclass_get_device(UCLASS_TEST_PROBE, 1, &dev)); in dm_test_first_next_device()
418 pdata = dev_get_plat(dev); in dm_test_first_next_device()
421 ut_assertok(uclass_first_device(UCLASS_TEST_PROBE, &dev)); in dm_test_first_next_device()
422 ut_asserteq(-ENOMEM, uclass_next_device(&dev)); in dm_test_first_next_device()
423 ut_asserteq_ptr(dev, NULL); in dm_test_first_next_device()
426 ut_assertok(uclass_get_device(UCLASS_TEST_PROBE, 0, &dev)); in dm_test_first_next_device()
427 pdata = dev_get_plat(dev); in dm_test_first_next_device()
430 ut_asserteq(-ENOENT, uclass_first_device(UCLASS_TEST_PROBE, &dev)); in dm_test_first_next_device()
439 struct udevice *dev; in dm_test_uclass_foreach() local
444 uclass_id_foreach_dev(UCLASS_TEST_FDT, dev, uc) in dm_test_uclass_foreach()
449 uclass_foreach_dev(dev, uc) in dm_test_uclass_foreach()
474 struct udevice *dev; in check_devices() local
480 uclass_first_device_check(UCLASS_TEST_PROBE, &dev)); in check_devices()
482 ut_asserteq_ptr(devlist[i], dev); in check_devices()
485 ut_asserteq(expected_ret, uclass_next_device_check(&dev)); in check_devices()
487 ut_asserteq_ptr(NULL, dev); in check_devices()
496 struct udevice *dev, *parent = NULL, *devlist[4]; in dm_test_first_next_ok_device() local
502 for (ret = uclass_first_device_check(UCLASS_TEST_PROBE, &dev); in dm_test_first_next_ok_device()
503 dev; in dm_test_first_next_ok_device()
504 ret = uclass_next_device_check(&dev)) { in dm_test_first_next_ok_device()
506 devlist[count++] = dev; in dm_test_first_next_ok_device()
507 parent = dev_get_parent(dev); in dm_test_first_next_ok_device()
510 ut_assertok(uclass_first_device_check(UCLASS_TEST_PROBE, &dev)); in dm_test_first_next_ok_device()
554 static int zero_size_cells_bus_bind(struct udevice *dev) in zero_size_cells_bus_bind() argument
559 ofnode_for_each_subnode(child, dev_ofnode(dev)) { in zero_size_cells_bus_bind()
563 err = device_bind_driver_to_node(dev, in zero_size_cells_bus_bind()
568 dev_err(dev, "%s: failed to bind %s\n", __func__, in zero_size_cells_bus_bind()
589 static int zero_size_cells_bus_child_bind(struct udevice *dev) in zero_size_cells_bus_child_bind() argument
594 ofnode_for_each_subnode(child, dev_ofnode(dev)) { in zero_size_cells_bus_child_bind()
595 err = lists_bind_fdt(dev, child, NULL, false); in zero_size_cells_bus_child_bind()
597 dev_err(dev, "%s: lists_bind_fdt, err=%d\n", in zero_size_cells_bus_child_bind()
614 struct udevice *dev; in dm_test_fdt_translation() local
618 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_translation()
619 ut_asserteq_str("dev@0,0", dev->name); in dm_test_fdt_translation()
620 ut_asserteq(0x8000, dev_read_addr(dev)); in dm_test_fdt_translation()
622 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 1, &dev)); in dm_test_fdt_translation()
623 ut_asserteq_str("dev@1,100", dev->name); in dm_test_fdt_translation()
624 ut_asserteq(0x9000, dev_read_addr(dev)); in dm_test_fdt_translation()
626 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 2, &dev)); in dm_test_fdt_translation()
627 ut_asserteq_str("dev@2,200", dev->name); in dm_test_fdt_translation()
628 ut_asserteq(0xA000, dev_read_addr(dev)); in dm_test_fdt_translation()
631 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 3, &dev)); in dm_test_fdt_translation()
632 ut_asserteq_str("dev@42", dev->name); in dm_test_fdt_translation()
634 ut_asserteq(0x42, dev_read_addr(dev)); in dm_test_fdt_translation()
638 ut_asserteq(0x8042, dev_read_addr(dev)); in dm_test_fdt_translation()
639 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 4, &dev)); in dm_test_fdt_translation()
640 ut_asserteq_str("dev@19", dev->name); in dm_test_fdt_translation()
641 ut_asserteq(0xc019, dev_read_addr(dev)); in dm_test_fdt_translation()
645 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_translation()
648 ut_asserteq(0x10000000, dev_translate_dma_address(dev, dma_addr)); in dm_test_fdt_translation()
650 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 1, &dev)); in dm_test_fdt_translation()
653 ut_asserteq(0x20000000, dev_translate_dma_address(dev, dma_addr)); in dm_test_fdt_translation()
661 struct udevice *gpio, *dev; in dm_test_fdt_get_addr_ptr_flat() local
668 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_get_addr_ptr_flat()
669 ptr = devfdt_get_addr_ptr(dev); in dm_test_fdt_get_addr_ptr_flat()
679 struct udevice *dev; in dm_test_fdt_remap_addr_flat() local
683 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_remap_addr_flat()
685 addr = devfdt_get_addr(dev); in dm_test_fdt_remap_addr_flat()
690 ut_asserteq_ptr(paddr, devfdt_remap_addr(dev)); in dm_test_fdt_remap_addr_flat()
699 struct udevice *dev; in dm_test_fdt_remap_addr_index_flat() local
704 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_remap_addr_index_flat()
706 addr = devfdt_get_addr_size_index(dev, 0, &size); in dm_test_fdt_remap_addr_index_flat()
712 ut_asserteq_ptr(paddr, devfdt_remap_addr_index(dev, 0)); in dm_test_fdt_remap_addr_index_flat()
721 struct udevice *dev; in dm_test_fdt_remap_addr_name_flat() local
726 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_remap_addr_name_flat()
728 addr = devfdt_get_addr_size_name(dev, "sandbox-dummy-0", &size); in dm_test_fdt_remap_addr_name_flat()
734 ut_asserteq_ptr(paddr, devfdt_remap_addr_name(dev, "sandbox-dummy-0")); in dm_test_fdt_remap_addr_name_flat()
743 struct udevice *dev; in dm_test_fdt_remap_addr_live() local
747 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_remap_addr_live()
749 addr = dev_read_addr(dev); in dm_test_fdt_remap_addr_live()
754 ut_asserteq_ptr(paddr, dev_remap_addr(dev)); in dm_test_fdt_remap_addr_live()
763 struct udevice *dev; in dm_test_fdt_remap_addr_index_live() local
768 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_remap_addr_index_live()
770 addr = dev_read_addr_size_index(dev, 0, &size); in dm_test_fdt_remap_addr_index_live()
776 ut_asserteq_ptr(paddr, dev_remap_addr_index(dev, 0)); in dm_test_fdt_remap_addr_index_live()
785 struct udevice *dev; in dm_test_fdt_remap_addr_name_live() local
790 ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev)); in dm_test_fdt_remap_addr_name_live()
792 addr = dev_read_addr_size_name(dev, "sandbox-dummy-0", &size); in dm_test_fdt_remap_addr_name_live()
798 ut_asserteq_ptr(paddr, dev_remap_addr_name(dev, "sandbox-dummy-0")); in dm_test_fdt_remap_addr_name_live()
807 struct udevice *dev; in dm_test_fdt_livetree_writing() local
824 &dev); in dm_test_fdt_livetree_writing()
825 ut_assertok(uclass_find_device_by_seq(UCLASS_USB, 2, &dev)); in dm_test_fdt_livetree_writing()
829 ut_assert(device_is_compatible(dev, "sandbox,usb")); in dm_test_fdt_livetree_writing()
831 ut_assert(device_is_compatible(dev, "gdsys,super-usb")); in dm_test_fdt_livetree_writing()
833 ut_assert(device_is_compatible(dev, "sandbox,usb")); in dm_test_fdt_livetree_writing()
838 ut_asserteq(FDT_ADDR_T_NONE, dev_read_addr(dev)); in dm_test_fdt_livetree_writing()
842 ut_asserteq(0x42, dev_read_addr(dev)); in dm_test_fdt_livetree_writing()
846 device_remove(dev, DM_REMOVE_NORMAL); in dm_test_fdt_livetree_writing()
847 device_unbind(dev); in dm_test_fdt_livetree_writing()
888 struct udevice *back, *dev, *dev2; in dm_test_fdt_phandle() local
893 back, "missing", &dev)); in dm_test_fdt_phandle()
895 "power-supply", &dev)); in dm_test_fdt_phandle()
896 ut_assertnonnull(dev); in dm_test_fdt_phandle()
897 ut_asserteq(0, device_active(dev)); in dm_test_fdt_phandle()
898 ut_asserteq_str("ldo1", dev->name); in dm_test_fdt_phandle()
901 ut_asserteq_ptr(dev, dev2); in dm_test_fdt_phandle()
910 struct udevice *i2c, *dev, *dev2; in dm_test_first_child() local
913 ut_assertok(device_find_first_child_by_uclass(i2c, UCLASS_RTC, &dev)); in dm_test_first_child()
914 ut_asserteq_str("rtc@43", dev->name); in dm_test_first_child()
916 ut_asserteq_ptr(dev, dev2); in dm_test_first_child()
921 &dev)); in dm_test_first_child()
922 ut_asserteq_str("eeprom@2c", dev->name); in dm_test_first_child()
924 ut_asserteq_ptr(dev, dev2); in dm_test_first_child()
927 UCLASS_VIDEO, &dev)); in dm_test_first_child()
928 ut_asserteq(-ENODEV, device_find_child_by_name(i2c, "missing", &dev)); in dm_test_first_child()
937 struct udevice *dev; in dm_test_read_int() local
943 ut_assertok(uclass_first_device_err(UCLASS_TEST_FDT, &dev)); in dm_test_read_int()
944 ut_asserteq_str("a-test", dev->name); in dm_test_read_int()
945 ut_assertok(dev_read_u32(dev, "int-value", &val32)); in dm_test_read_int()
948 ut_asserteq(-EINVAL, dev_read_u32(dev, "missing", &val32)); in dm_test_read_int()
949 ut_asserteq(6, dev_read_u32_default(dev, "missing", 6)); in dm_test_read_int()
951 ut_asserteq(1234, dev_read_u32_default(dev, "int-value", 6)); in dm_test_read_int()
954 ut_asserteq(-EINVAL, dev_read_s32(dev, "missing", &sval)); in dm_test_read_int()
955 ut_asserteq(6, dev_read_s32_default(dev, "missing", 6)); in dm_test_read_int()
957 ut_asserteq(-1234, dev_read_s32_default(dev, "uint-value", 6)); in dm_test_read_int()
958 ut_assertok(dev_read_s32(dev, "uint-value", &sval)); in dm_test_read_int()
962 ut_asserteq(-EINVAL, dev_read_u32u(dev, "missing", &val)); in dm_test_read_int()
963 ut_assertok(dev_read_u32u(dev, "uint-value", &val)); in dm_test_read_int()
966 ut_assertok(dev_read_u64(dev, "int64-value", &val64)); in dm_test_read_int()
969 ut_asserteq_64(-EINVAL, dev_read_u64(dev, "missing", &val64)); in dm_test_read_int()
970 ut_asserteq_64(6, dev_read_u64_default(dev, "missing", 6)); in dm_test_read_int()
973 dev_read_u64_default(dev, "int64-value", 6)); in dm_test_read_int()
981 struct udevice *dev; in dm_test_read_int_index() local
984 ut_assertok(uclass_first_device_err(UCLASS_TEST_FDT, &dev)); in dm_test_read_int_index()
985 ut_asserteq_str("a-test", dev->name); in dm_test_read_int_index()
987 ut_asserteq(-EINVAL, dev_read_u32_index(dev, "missing", 0, &val32)); in dm_test_read_int_index()
988 ut_asserteq(19, dev_read_u32_index_default(dev, "missing", 0, 19)); in dm_test_read_int_index()
990 ut_assertok(dev_read_u32_index(dev, "int-array", 0, &val32)); in dm_test_read_int_index()
992 ut_assertok(dev_read_u32_index(dev, "int-array", 1, &val32)); in dm_test_read_int_index()
994 ut_assertok(dev_read_u32_index(dev, "int-array", 2, &val32)); in dm_test_read_int_index()
996 ut_asserteq(-EOVERFLOW, dev_read_u32_index(dev, "int-array", 3, in dm_test_read_int_index()
999 ut_asserteq(5678, dev_read_u32_index_default(dev, "int-array", 0, 2)); in dm_test_read_int_index()
1000 ut_asserteq(9123, dev_read_u32_index_default(dev, "int-array", 1, 2)); in dm_test_read_int_index()
1001 ut_asserteq(4567, dev_read_u32_index_default(dev, "int-array", 2, 2)); in dm_test_read_int_index()
1002 ut_asserteq(2, dev_read_u32_index_default(dev, "int-array", 3, 2)); in dm_test_read_int_index()
1010 struct udevice *dev; in dm_test_read_phandle() local
1017 ut_assertok(uclass_first_device_err(UCLASS_TEST_FDT, &dev)); in dm_test_read_phandle()
1018 ut_asserteq_str("a-test", dev->name); in dm_test_read_phandle()
1021 ret = dev_count_phandle_with_args(dev, "missing", cell, 0); in dm_test_read_phandle()
1023 ret = dev_count_phandle_with_args(dev, prop, "#invalid", 0); in dm_test_read_phandle()
1025 ut_asserteq(5, dev_count_phandle_with_args(dev, prop, cell, 0)); in dm_test_read_phandle()
1028 ret = dev_read_phandle_with_args(dev, "missing", cell, 0, 0, &args); in dm_test_read_phandle()
1030 ret = dev_read_phandle_with_args(dev, prop, "#invalid", 0, 0, &args); in dm_test_read_phandle()
1032 ut_assertok(dev_read_phandle_with_args(dev, prop, cell, 0, 0, &args)); in dm_test_read_phandle()
1035 ut_assertok(dev_read_phandle_with_args(dev, prop, cell, 0, 1, &args)); in dm_test_read_phandle()
1038 ut_assertok(dev_read_phandle_with_args(dev, prop, cell, 0, 2, &args)); in dm_test_read_phandle()
1042 ret = dev_read_phandle_with_args(dev, prop, cell, 0, 3, &args); in dm_test_read_phandle()
1044 ut_assertok(dev_read_phandle_with_args(dev, prop, cell, 0, 4, &args)); in dm_test_read_phandle()
1047 ret = dev_read_phandle_with_args(dev, prop, cell, 0, 5, &args); in dm_test_read_phandle()
1051 ret = dev_count_phandle_with_args(dev, "missing", NULL, 2); in dm_test_read_phandle()
1053 ut_asserteq(3, dev_count_phandle_with_args(dev, prop2, NULL, 1)); in dm_test_read_phandle()
1056 ut_assertok(dev_read_phandle_with_args(dev, prop2, NULL, 1, 0, &args)); in dm_test_read_phandle()
1060 ret = dev_read_phandle_with_args(dev, prop2, NULL, 1, 1, &args); in dm_test_read_phandle()
1062 ut_assertok(dev_read_phandle_with_args(dev, prop2, NULL, 1, 2, &args)); in dm_test_read_phandle()
1066 ret = dev_read_phandle_with_args(dev, prop2, NULL, 1, 3, &args); in dm_test_read_phandle()
1076 struct udevice *dev; in dm_test_uclass_drvdata() local
1079 DM_TEST_TYPE_FIRST, &dev)); in dm_test_uclass_drvdata()
1080 ut_asserteq_str("a-test", dev->name); in dm_test_uclass_drvdata()
1083 DM_TEST_TYPE_SECOND, &dev)); in dm_test_uclass_drvdata()
1084 ut_asserteq_str("d-test", dev->name); in dm_test_uclass_drvdata()
1088 &dev)); in dm_test_uclass_drvdata()
1097 struct udevice *bus, *dev; in dm_test_child_ofdata() local
1102 device_foreach_child_of_to_plat(dev, bus) { in dm_test_child_ofdata()
1103 ut_assert(dev_get_flags(dev) & DM_FLAG_PLATDATA_VALID); in dm_test_child_ofdata()
1104 ut_assert(!(dev_get_flags(dev) & DM_FLAG_ACTIVATED)); in dm_test_child_ofdata()
1116 struct udevice *bus, *dev; in dm_test_first_child_probe() local
1121 device_foreach_child_probe(dev, bus) { in dm_test_first_child_probe()
1122 ut_assert(dev_get_flags(dev) & DM_FLAG_PLATDATA_VALID); in dm_test_first_child_probe()
1123 ut_assert(dev_get_flags(dev) & DM_FLAG_ACTIVATED); in dm_test_first_child_probe()
1135 struct udevice *bus, *dev; in dm_test_ofdata_order() local
1141 ut_assertok(device_find_first_child(bus, &dev)); in dm_test_ofdata_order()
1142 ut_assertnonnull(dev); in dm_test_ofdata_order()
1143 ut_assert(!(dev_get_flags(dev) & DM_FLAG_PLATDATA_VALID)); in dm_test_ofdata_order()
1146 ut_assertok(device_of_to_plat(dev)); in dm_test_ofdata_order()
1147 ut_assert(dev_get_flags(dev) & DM_FLAG_PLATDATA_VALID); in dm_test_ofdata_order()
1150 ut_assert(!(dev_get_flags(dev) & DM_FLAG_ACTIVATED)); in dm_test_ofdata_order()
1160 struct udevice *dev; in dm_test_decode_display_timing() local
1163 ut_assertok(uclass_first_device_err(UCLASS_TEST_FDT, &dev)); in dm_test_decode_display_timing()
1164 ut_asserteq_str("a-test", dev->name); in dm_test_decode_display_timing()
1166 ut_assertok(dev_decode_display_timing(dev, 0, &timing)); in dm_test_decode_display_timing()
1188 ut_assertok(dev_decode_display_timing(dev, 1, &timing)); in dm_test_decode_display_timing()
1210 ut_assertok(dev_decode_display_timing(dev, 2, &timing)); in dm_test_decode_display_timing()
1232 ut_assert(dev_decode_display_timing(dev, 3, &timing)); in dm_test_decode_display_timing()