@@ -136,6 +136,9 @@ LOG_MODULE_REGISTER(adc_ad7124, CONFIG_ADC_LOG_LEVEL);
136136/* Error register bits */
137137#define AD7124_ERR_REG_SPI_IGNORE_ERR BIT(6)
138138
139+ /* Burnout current source configuration bits */
140+ #define AD7124_BURNOUT_CURRENT_SOURCE_MSK GENMASK(10, 9)
141+
139142enum ad7124_register_lengths {
140143 AD7124_STATUS_REG_LEN = 1 ,
141144 AD7124_ADC_CONTROL_REG_LEN = 2 ,
@@ -232,6 +235,13 @@ enum ad7124_iout_channel {
232235 AD7124_IOUT_AIN7 = 15 ,
233236};
234237
238+ enum ad7124_burnout_current_strength {
239+ AD7124_BURNOUT_OFF = 0 ,
240+ AD7124_BURNOUT_0_5_UA = 1 ,
241+ AD7124_BURNOUT_2_UA = 2 ,
242+ AD7124_BURNOUT_4_UA = 3
243+ };
244+
235245struct ad7124_current_source_config {
236246 enum ad7124_iout_current current ;
237247 enum ad7124_iout_channel channel ;
@@ -241,6 +251,7 @@ struct ad7124_config_props {
241251 enum ad7124_reference_source refsel ;
242252 enum ad7124_gain pga_bits ;
243253 enum ad7124_filter_type filter_type ;
254+ enum ad7124_burnout_current_strength burnout_strength ;
244255 uint16_t odr_sel_bits ;
245256 bool bipolar ;
246257 bool inbuf_enable ;
@@ -464,6 +475,7 @@ static int adc_ad7124_create_new_cfg(const struct device *dev, const struct adc_
464475 new_cfg -> props .filter_type = AD7124_FILTER_SINC4 ;
465476 }
466477
478+ new_cfg -> props .burnout_strength = cfg -> burnout_source_strength ;
467479 new_cfg -> props .odr_sel_bits = adc_ad7124_odr_to_fs (dev , odr );
468480 new_cfg -> props .bipolar = config -> bipolar_mask & BIT (cfg -> channel_id );
469481 new_cfg -> props .inbuf_enable = config -> inbuf_enable_mask & BIT (cfg -> channel_id );
@@ -725,6 +737,8 @@ static int adc_ad7124_setup_cfg(const struct device *dev, const struct ad7124_ch
725737
726738 configuration_setup |= FIELD_PREP (AD7124_SETUP_CONF_REG_REF_SEL_MSK , cfg -> props .refsel );
727739 configuration_setup |= FIELD_PREP (AD7124_SETUP_CONF_PGA_MSK , cfg -> props .pga_bits );
740+ configuration_setup |=
741+ FIELD_PREP (AD7124_BURNOUT_CURRENT_SOURCE_MSK , cfg -> props .burnout_strength );
728742 configuration_mask |= AD7124_SETUP_CONFIGURATION_MASK ;
729743
730744 ret = adc_ad7124_reg_write_msk (dev , AD7124_CONFIG (cfg -> cfg_slot ), AD7124_CONFIG_REG_LEN ,
0 commit comments