| // SPDX-License-Identifier: GPL-2.0+ |
| static int dm_test_ofnode_get_property_by_prop(struct unit_test_state *uts) |
| node = ofnode_path("/cros-ec/flash"); |
| for (res = ofnode_get_first_property(node, &prop); |
| res = ofnode_get_next_property(&prop)) { |
| value = ofnode_get_property_by_prop(&prop, &propname, &len); |
| ut_asserteq_str("image-pos", propname); |
| ut_asserteq_str("size", propname); |
| ut_asserteq_str("erase-value", propname); |
| ut_asserteq_str("name", propname); |
| ut_asserteq_str("flash", value); |
| DM_TEST(dm_test_ofnode_get_property_by_prop, |
| DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); |