Lines Matching refs:index
301 #define _SBS_GAUGE_BATT_CUTOFF_CFG_VAR_NAME(index) sbs_gauge_batt_cutoff_cfg_##index argument
304 #define _SBS_GAUGE_CONFIG_DEFINE(index) \ argument
306 index) = { \
307 .reg = DT_INST_PROP(index, battery_cutoff_reg_addr), \
308 .payload = DT_INST_PROP(index, battery_cutoff_payload), \
309 .payload_size = DT_INST_PROP_LEN(index, battery_cutoff_payload), \
313 #define SBS_GAUGE_CONFIG_DEFINE(index) \ argument
314 COND_CODE_1(DT_INST_PROP(index, battery_cutoff_support), \
315 (_SBS_GAUGE_CONFIG_DEFINE(index)), (;))
318 #define SBS_GAUGE_GET_BATTERY_CONFIG_NAME(index) \ argument
319 COND_CODE_1(DT_INST_PROP(index, battery_cutoff_support), \
320 (&_SBS_GAUGE_BATT_CUTOFF_CFG_VAR_NAME(index)), (NULL))
322 #define SBS_GAUGE_INIT(index) \ argument
323 SBS_GAUGE_CONFIG_DEFINE(index); \
324 static const struct sbs_gauge_config sbs_gauge_config_##index = { \
325 .i2c = I2C_DT_SPEC_INST_GET(index), \
326 .cutoff_cfg = SBS_GAUGE_GET_BATTERY_CONFIG_NAME(index)}; \
328 DEVICE_DT_INST_DEFINE(index, &sbs_gauge_init, NULL, NULL, &sbs_gauge_config_##index, \