Lines Matching +full:pha +full:- +full:gpios
4 * SPDX-License-Identifier: Apache-2.0
126 "vnd,gpio-device"), ""); in ZTEST()
127 zassert_true(!strcmp(DT_PROP_LAST(TEST_DEADBEEF, compatible), "vnd,gpio-device"), ""); in ZTEST()
140 "vnd,gpio-device"), ""); in ZTEST()
156 "vnd,gpio-device"), ""); in ZTEST()
169 "vnd,gpio-device"), ""); in ZTEST()
190 "vnd,gpio-device"), ""); in ZTEST()
199 "vnd,gpio-device"), ""); in ZTEST()
284 zassert_equal(DT_PROP_OR(TEST_REG, not_a_property, -1), -1, ""); in ZTEST()
287 zassert_equal(DT_PHA_BY_IDX_OR(TEST_TEMP, dmas, 1, not_a_cell, -1), -1, in ZTEST()
291 zassert_equal(DT_PHA_OR(TEST_TEMP, dmas, not_a_cell, -1), -1, ""); in ZTEST()
295 zassert_equal(DT_PHA_BY_NAME_OR(TEST_TEMP, dmas, tx, not_a_cell, -1), in ZTEST()
296 -1, ""); in ZTEST()
302 zassert_equal(DT_INST_PROP_OR(0, not_a_property, -1), -1, ""); in ZTEST()
307 zassert_equal(DT_INST_PROP_LEN_OR(0, not_a_property, -1), -1, ""); in ZTEST()
312 zassert_equal(DT_INST_PHA_BY_IDX_OR(0, dmas, 1, not_a_cell, -1), -1, in ZTEST()
316 zassert_equal(DT_INST_PHA_OR(0, dmas, not_a_cell, -1), -1, ""); in ZTEST()
320 zassert_equal(DT_INST_PHA_BY_NAME_OR(0, dmas, tx, not_a_cell, -1), -1, in ZTEST()
438 /* Test a nested I2C bus using vnd,i2c-mux. */ in ZTEST()
450 "expected TEST_SPI_NO_CS as bus for vnd,spi-device-2"); in ZTEST()
456 * either vnd,spi-device. in ZTEST()
548 #define VND_VENDOR "A stand-in for a real vendor which can be used in examples and tests"
549 #define ZEP_VENDOR "Zephyr-specific binding"
940 struct gpios_struct gps[] = DT_GPIO_LISTIFY(TEST_PH, gpios); in ZTEST()
969 /* DT_PROP_BY_PHANDLE_IDX on a phandle-array type property */ in ZTEST()
970 zassert_equal(DT_PROP_BY_PHANDLE_IDX(TEST_PH, gpios, 0, in ZTEST()
972 zassert_equal(DT_PROP_BY_PHANDLE_IDX(TEST_PH, gpios, 1, in ZTEST()
974 zassert_true(!strcmp(DT_PROP_BY_PHANDLE_IDX(TEST_PH, gpios, 0, status), in ZTEST()
976 zassert_true(!strcmp(DT_PROP_BY_PHANDLE_IDX(TEST_PH, gpios, 1, status), in ZTEST()
985 /* phandle-array */ in ZTEST()
986 zassert_true(DT_NODE_HAS_PROP(TEST_PH, gpios), ""); in ZTEST()
988 zassert_equal(DT_PROP_LEN(TEST_PH, gpios), 2, ""); in ZTEST()
991 zassert_true(DT_PROP_HAS_IDX(TEST_PH, gpios, 0), ""); in ZTEST()
992 zassert_true(DT_PROP_HAS_IDX(TEST_PH, gpios, 1), ""); in ZTEST()
993 zassert_false(DT_PROP_HAS_IDX(TEST_PH, gpios, 2), ""); in ZTEST()
998 zassert_false(DT_PROP_HAS_NAME(TEST_PH, foos, b-c), ""); in ZTEST()
1003 zassert_true(DT_PHA_HAS_CELL_AT_IDX(TEST_PH, gpios, 1, pin), ""); in ZTEST()
1004 zassert_true(DT_PHA_HAS_CELL_AT_IDX(TEST_PH, gpios, 1, flags), ""); in ZTEST()
1005 /* pha-gpios index 1 has nothing, not even a phandle */ in ZTEST()
1021 zassert_true(DT_PHA_HAS_CELL(TEST_PH, gpios, flags), ""); in ZTEST()
1022 zassert_false(DT_PHA_HAS_CELL(TEST_PH, gpios, bar), ""); in ZTEST()
1025 zassert_true(DT_SAME_NODE(DT_PHANDLE_BY_IDX(TEST_PH, gpios, 0), TEST_GPIO_1), ""); in ZTEST()
1026 zassert_true(DT_SAME_NODE(DT_PHANDLE_BY_IDX(TEST_PH, gpios, 1), TEST_GPIO_2), ""); in ZTEST()
1029 zassert_true(DT_SAME_NODE(DT_PHANDLE(TEST_PH, gpios), TEST_GPIO_1), ""); in ZTEST()
1032 zassert_equal(DT_PHA(TEST_PH, gpios, pin), 10, ""); in ZTEST()
1033 zassert_equal(DT_PHA(TEST_PH, gpios, flags), 20, ""); in ZTEST()
1036 zassert_equal(DT_PHA_BY_IDX(TEST_PH, gpios, 0, pin), 10, ""); in ZTEST()
1037 zassert_equal(DT_PHA_BY_IDX(TEST_PH, gpios, 0, flags), 20, ""); in ZTEST()
1039 zassert_equal(DT_PHA_BY_IDX(TEST_PH, gpios, 1, pin), 30, ""); in ZTEST()
1040 zassert_equal(DT_PHA_BY_IDX(TEST_PH, gpios, 1, flags), 40, ""); in ZTEST()
1068 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, gpios, 0, in ZTEST()
1071 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, gpios, 1, in ZTEST()
1074 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, gpios, 0, ngpios), in ZTEST()
1076 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, gpios, 1, ngpios), in ZTEST()
1080 zassert_true(DT_INST_PROP_HAS_IDX(0, gpios, 0), ""); in ZTEST()
1081 zassert_true(DT_INST_PROP_HAS_IDX(0, gpios, 1), ""); in ZTEST()
1082 zassert_false(DT_INST_PROP_HAS_IDX(0, gpios, 2), ""); in ZTEST()
1087 zassert_false(DT_INST_PROP_HAS_NAME(0, foos, b-c), ""); in ZTEST()
1092 zassert_true(DT_INST_PHA_HAS_CELL_AT_IDX(0, gpios, 1, pin), ""); in ZTEST()
1093 zassert_true(DT_INST_PHA_HAS_CELL_AT_IDX(0, gpios, 1, flags), ""); in ZTEST()
1108 zassert_true(DT_INST_PHA_HAS_CELL(0, gpios, flags), ""); in ZTEST()
1109 zassert_false(DT_INST_PHA_HAS_CELL(0, gpios, bar), ""); in ZTEST()
1112 zassert_true(DT_SAME_NODE(DT_INST_PHANDLE_BY_IDX(0, gpios, 0), TEST_GPIO_1), ""); in ZTEST()
1113 zassert_true(DT_SAME_NODE(DT_INST_PHANDLE_BY_IDX(0, gpios, 1), TEST_GPIO_2), ""); in ZTEST()
1116 zassert_true(DT_SAME_NODE(DT_INST_PHANDLE(0, gpios), TEST_GPIO_1), ""); in ZTEST()
1119 zassert_equal(DT_INST_PHA(0, gpios, pin), 10, ""); in ZTEST()
1120 zassert_equal(DT_INST_PHA(0, gpios, flags), 20, ""); in ZTEST()
1123 zassert_equal(DT_INST_PHA_BY_IDX(0, gpios, 0, pin), 10, ""); in ZTEST()
1124 zassert_equal(DT_INST_PHA_BY_IDX(0, gpios, 0, flags), 20, ""); in ZTEST()
1126 zassert_equal(DT_INST_PHA_BY_IDX(0, gpios, 1, pin), 30, ""); in ZTEST()
1127 zassert_equal(DT_INST_PHA_BY_IDX(0, gpios, 1, flags), 40, ""); in ZTEST()
1143 zassert_true(!strcmp(TO_STRING(DT_GPIO_CTLR_BY_IDX(TEST_PH, gpios, 0)), in ZTEST()
1145 zassert_true(!strcmp(TO_STRING(DT_GPIO_CTLR_BY_IDX(TEST_PH, gpios, 1)), in ZTEST()
1149 zassert_true(!strcmp(TO_STRING(DT_GPIO_CTLR(TEST_PH, gpios)), in ZTEST()
1153 zassert_equal(DT_GPIO_PIN_BY_IDX(TEST_PH, gpios, 0), 10, ""); in ZTEST()
1154 zassert_equal(DT_GPIO_PIN_BY_IDX(TEST_PH, gpios, 1), 30, ""); in ZTEST()
1157 zassert_equal(DT_GPIO_PIN(TEST_PH, gpios), 10, ""); in ZTEST()
1160 zassert_equal(DT_GPIO_FLAGS_BY_IDX(TEST_PH, gpios, 0), 20, ""); in ZTEST()
1161 zassert_equal(DT_GPIO_FLAGS_BY_IDX(TEST_PH, gpios, 1), 40, ""); in ZTEST()
1164 zassert_equal(DT_GPIO_FLAGS(TEST_PH, gpios), 20, ""); in ZTEST()
1187 zassert_equal(DT_INST_GPIO_PIN_BY_IDX(0, gpios, 0), 10, ""); in ZTEST()
1188 zassert_equal(DT_INST_GPIO_PIN_BY_IDX(0, gpios, 1), 30, ""); in ZTEST()
1191 zassert_equal(DT_INST_GPIO_PIN(0, gpios), 10, ""); in ZTEST()
1194 zassert_equal(DT_INST_GPIO_FLAGS_BY_IDX(0, gpios, 0), 20, ""); in ZTEST()
1195 zassert_equal(DT_INST_GPIO_FLAGS_BY_IDX(0, gpios, 1), 40, ""); in ZTEST()
1198 zassert_equal(DT_INST_GPIO_FLAGS(0, gpios), 20, ""); in ZTEST()
1710 * For-each-node type macro tests. in ZTEST()
1713 * for-each-property type macros. in ZTEST()
1720 * "/test/enum-0" "/test/enum-1" in ZTEST()
1726 zassert_true(!strcmp(str, "/test/enum-0/test/enum-1") || in ZTEST()
1727 !strcmp(str, "/test/enum-1/test/enum-0"), ""); in ZTEST()
1926 DT_FOREACH_PROP_ELEM(TEST_PH, gpios, PIN_COMMA) in ZTEST()
2030 struct test_gpio_data *data = dev->data; in test_gpio_init()
2032 data->init_called = 1; in test_gpio_init()
2071 data_dev0 = devs[0]->data; in ZTEST()
2072 data_dev1 = devs[1]->data; in ZTEST()
2077 zassert_true(data_dev0->is_gpio_ctlr, ""); in ZTEST()
2078 zassert_true(data_dev1->is_gpio_ctlr, ""); in ZTEST()
2079 zassert_true(data_dev0->init_called, ""); in ZTEST()
2080 zassert_true(data_dev1->init_called, ""); in ZTEST()
2083 config_abdc = dev_abcd->config; in ZTEST()
2085 zassert_equal(config_abdc->reg_addr, 0xabcd1234, ""); in ZTEST()
2086 zassert_equal(config_abdc->reg_len, 0x500, ""); in ZTEST()
2133 /* DT_ENUM_IDX_BY_IDX and DT_ENUM_HAS_VALUE_BY_IDX on string-array enum */ in ZTEST()
2150 /* DT_ENUM_IDX_BY_IDX and DT_ENUM_HAS_VALUE_BY_IDX on int-array enum */ in ZTEST()
2185 /* DT_ENUM_IDX_OR on string-array value */ in ZTEST()
2190 /* DT_ENUM_IDX_OR on int-array value */ in ZTEST()
2279 /* clock-freq on fixed clock */ in ZTEST()
2322 /* clock-freq on fixed clock */ in ZTEST()
2335 * The parent's label for the first instance of vnd,spi-device, in ZTEST()
2798 * Combined ordinals for /test/test-children are from in ZTEST()
2824 "test-children at %zu", i); in ZTEST()
2829 * Combined ordinals for /test/test-children/child-a in ZTEST()
2851 "child-a at %zu", i); in ZTEST()
2884 * We go through the STRINGIFY()->atoi conversion cycle to avoid in ZTEST()
2911 "temperature-sensor"), ""); in ZTEST()
2913 "reg-holder"), ""); in ZTEST()
3189 zassert_between_inclusive(ids[i], 0, ARRAY_SIZE(ids) - 1, ""); in ZTEST()
3410 const double f1_expected = 0.9e-3; in ZTEST()
3411 const double delta = 0.1e-4; in ZTEST()
3501 #define XMINUS - in ZTEST()
3504 const double delta = 0.1e-4; in ZTEST()
3630 /* reg-width on reset */ in ZTEST()
3659 /* reg-width on reset */ in ZTEST()