Lines Matching refs:_n
154 #define DEVMUX_PHANDLE_DEVICES(_n) \ argument
155 DT_INST_FOREACH_PROP_ELEM_SEP(_n, devices, DEVMUX_PHANDLE_TO_DEVICE, (,))
157 #define DEVMUX_SELECTED(_n) DT_INST_PROP(_n, selected) argument
159 #define DEVMUX_DEFINE(_n) \ argument
160 BUILD_ASSERT(DT_INST_PROP_OR(_n, zephyr_mutable, 0), \
162 BUILD_ASSERT(DT_INST_PROP_LEN(_n, devices) > 0, "devices array must have non-zero size"); \
163 BUILD_ASSERT(DT_INST_PROP_LEN(_n, devices) <= INT_MAX, \
165 BUILD_ASSERT(DEVMUX_SELECTED(_n) >= 0, "selected must be > 0"); \
166 BUILD_ASSERT(DEVMUX_SELECTED(_n) < DT_INST_PROP_LEN(_n, devices), \
168 static const struct device *demux_devs_##_n[] = {DEVMUX_PHANDLE_DEVICES(_n)}; \
169 static const struct devmux_config devmux_config_##_n = { \
170 .devs = demux_devs_##_n, \
171 .n_devs = DT_INST_PROP_LEN(_n, devices), \
173 static struct devmux_data devmux_data_##_n = { \
174 .selected = DEVMUX_SELECTED(_n), \
177 DEVICE_DT_INST_DEFINE(_n, devmux_init, NULL, &devmux_data_##_n, &devmux_config_##_n, \
182 #define DEVMUX_DEVICE_GET(_n) DEVICE_DT_INST_GET(_n), argument