File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
drivers/sensor/adi/adltc2990 Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ static int adltc2990_fetch_property_value(const struct device *dev,
228228static int adltc2990_init (const struct device * dev )
229229{
230230 const struct adltc2990_config * cfg = dev -> config ;
231+ int err ;
231232
232233 if (!i2c_is_ready_dt (& cfg -> bus )) {
233234 LOG_ERR ("I2C bus %s not ready" , cfg -> bus .bus -> name );
@@ -238,12 +239,17 @@ static int adltc2990_init(const struct device *dev)
238239 cfg -> measurement_mode [1 ] << 3 | cfg -> measurement_mode [0 ];
239240
240241 LOG_DBG ("Setting Control Register to: 0x%x" , ctrl_reg_setting );
241- int err = i2c_reg_write_byte_dt (& cfg -> bus , ADLTC2990_REG_CONTROL , ctrl_reg_setting );
242-
242+ err = i2c_reg_write_byte_dt (& cfg -> bus , ADLTC2990_REG_CONTROL , ctrl_reg_setting );
243243 if (err < 0 ) {
244244 LOG_ERR ("configuring for single bus failed: %d" , err );
245245 return err ;
246246 }
247+
248+ err = adltc2990_trigger_measurement (dev );
249+ if (err < 0 ) {
250+ LOG_ERR ("triggering measurement failed: %d" , err );
251+ }
252+
247253 LOG_INF ("Initializing ADLTC2990 with name %s" , dev -> name );
248254 return 0 ;
249255}
You can’t perform that action at this time.
0 commit comments