Lines Matching full:inst
106 #define INPUT_LONGPRESS_DEFINE(inst) \ argument
107 BUILD_ASSERT((DT_INST_PROP_LEN(inst, input_codes) == \
108 DT_INST_PROP_LEN_OR(inst, short_codes, 0)) || \
109 !DT_INST_NODE_HAS_PROP(inst, short_codes)); \
110 BUILD_ASSERT(DT_INST_PROP_LEN(inst, input_codes) == DT_INST_PROP_LEN(inst, long_codes)); \
112 INPUT_CALLBACK_DEFINE_NAMED(DEVICE_DT_GET_OR_NULL(DT_INST_PHANDLE(inst, input)), \
113 longpress_cb, (void *)DEVICE_DT_INST_GET(inst), \
114 longpress_cb_##inst); \
116 static const uint16_t longpress_input_codes_##inst[] = DT_INST_PROP(inst, input_codes); \
118 IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, short_codes), ( \
119 static const uint16_t longpress_short_codes_##inst[] = DT_INST_PROP(inst, short_codes); \
122 static const uint16_t longpress_long_codes_##inst[] = DT_INST_PROP(inst, long_codes); \
124 static struct longpress_data_entry longpress_data_entries_##inst[DT_INST_PROP_LEN( \
125 inst, input_codes)]; \
127 static const struct longpress_config longpress_config_##inst = { \
128 .input_dev = DEVICE_DT_GET_OR_NULL(DT_INST_PHANDLE(inst, input)), \
129 .entries = longpress_data_entries_##inst, \
130 .input_codes = longpress_input_codes_##inst, \
131 IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, short_codes), ( \
132 .short_codes = longpress_short_codes_##inst, \
134 .long_codes = longpress_long_codes_##inst, \
135 .num_codes = DT_INST_PROP_LEN(inst, input_codes), \
136 .long_delays_ms = DT_INST_PROP(inst, long_delay_ms), \
139 DEVICE_DT_INST_DEFINE(inst, longpress_init, NULL, \
140 NULL, &longpress_config_##inst, \