Lines Matching refs:index
212 #define CAP12XX_INIT(index) \ argument
213 IF_ENABLED(DT_INST_NODE_HAS_PROP(index, int_gpios), ( \
214 static struct gpio_dt_spec cap12xx_int_gpio_##index = \
215 GPIO_DT_SPEC_INST_GET(index, int_gpios);)) \
216 static const uint16_t cap12xx_input_codes_##index[] = DT_INST_PROP(index, input_codes); \
217 static const struct cap12xx_config cap12xx_config_##index = { \
218 .i2c = I2C_DT_SPEC_INST_GET(index), \
219 .input_channels = DT_INST_PROP_LEN(index, input_codes), \
220 .input_codes = cap12xx_input_codes_##index, \
221 IF_ENABLED(DT_INST_NODE_HAS_PROP(index, int_gpios), ( \
222 .int_gpio = &cap12xx_int_gpio_##index,)) \
223 .repeat = DT_INST_PROP(index, repeat), \
224 .poll_interval_ms = DT_INST_PROP_OR(index, poll_interval_ms, 10)}; \
225 static struct cap12xx_data cap12xx_data_##index; \
226 DEVICE_DT_INST_DEFINE(index, cap12xx_init, NULL, &cap12xx_data_##index, \
227 &cap12xx_config_##index, POST_KERNEL, CONFIG_INPUT_INIT_PRIORITY, \