Lines Matching full:inst

154 #define LPS2XDF_CFG_IRQ(inst)                                                  \  argument
156 .gpio_int = GPIO_DT_SPEC_INST_GET(inst, drdy_gpios), \
157 .drdy_pulsed = DT_INST_PROP(inst, drdy_pulsed)
159 #define LPS2XDF_CFG_IRQ(inst) argument
162 #define LPS2XDF_CONFIG_COMMON(inst, name) \ argument
163 .odr = DT_INST_PROP(inst, odr), \
164 .lpf = DT_INST_PROP(inst, lpf), \
165 .avg = DT_INST_PROP(inst, avg), \
167 IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, fs), \
168 (.fs = DT_INST_PROP(inst, fs),)) \
169 IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, drdy_gpios), \
170 (LPS2XDF_CFG_IRQ(inst)))
175 #define LPS2XDF_CONFIG_SPI(inst, name) \ argument
177 STMEMSC_CTX_SPI(&lps2xdf_config_##name##_##inst.stmemsc_cfg), \
179 .spi = SPI_DT_SPEC_INST_GET(inst, LPS2XDF_SPI_OPERATION, 0), \
181 LPS2XDF_CONFIG_COMMON(inst, name) \
184 #define LPS2XDF_CONFIG_I2C(inst, name) \ argument
186 STMEMSC_CTX_I2C(&lps2xdf_config_##name##_##inst.stmemsc_cfg), \
188 .i2c = I2C_DT_SPEC_INST_GET(inst), \
190 LPS2XDF_CONFIG_COMMON(inst, name) \
193 #define LPS2XDF_CONFIG_I3C(inst, name) \ argument
195 STMEMSC_CTX_I3C(&lps2xdf_config_##name##_##inst.stmemsc_cfg), \
197 .i3c = &lps2xdf_data_##name##_##inst.i3c_dev, \
199 .i3c.bus = DEVICE_DT_GET(DT_INST_BUS(inst)), \
200 .i3c.dev_id = I3C_DEVICE_ID_DT_INST(inst), \
201 LPS2XDF_CONFIG_COMMON(inst, name) \
204 #define LPS2XDF_CONFIG_I3C_OR_I2C(inst, name) \ argument
205 COND_CODE_0(DT_INST_PROP_BY_IDX(inst, reg, 1), \
206 (LPS2XDF_CONFIG_I2C(inst, name)), \
207 (LPS2XDF_CONFIG_I3C(inst, name)))
209 #define LPS2XDF_DEFINE(inst, name) \ argument
210 static struct lps2xdf_data lps2xdf_data_##name##_##inst; \
211 static const struct lps2xdf_config lps2xdf_config_##name##_##inst = COND_CODE_1( \
212 DT_INST_ON_BUS(inst, spi), \
213 (LPS2XDF_CONFIG_SPI(inst, name)), \
214 (COND_CODE_1(DT_INST_ON_BUS(inst, i3c), \
215 (LPS2XDF_CONFIG_I3C_OR_I2C(inst, name)), \
216 (LPS2XDF_CONFIG_I2C(inst, name))))); \
218 SENSOR_DEVICE_DT_INST_DEFINE(inst, name##_init, NULL, &lps2xdf_data_##name##_##inst, \
219 &lps2xdf_config_##name##_##inst, POST_KERNEL, \