drivers: adc: lmp90xxx: do not exit acquisition thread on error

Keep the acquisition thread running even if an ADC reading failed.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2020-03-26 09:51:21 +01:00 committed by Kumar Gala
commit fce6a8b853

View file

@ -662,7 +662,7 @@ static void lmp90xxx_acquisition_thread(struct device *dev)
if (err) { if (err) {
LOG_ERR("failed to read ADC DOUT (err %d)", err); LOG_ERR("failed to read ADC DOUT (err %d)", err);
adc_context_complete(&data->ctx, err); adc_context_complete(&data->ctx, err);
return; continue;
} }
if (IS_ENABLED(CONFIG_ADC_LMP90XXX_CRC)) { if (IS_ENABLED(CONFIG_ADC_LMP90XXX_CRC)) {
@ -672,7 +672,7 @@ static void lmp90xxx_acquisition_thread(struct device *dev)
LOG_ERR("CRC mismatch (0x%02x vs. 0x%02x)", LOG_ERR("CRC mismatch (0x%02x vs. 0x%02x)",
buf[3], crc); buf[3], crc);
adc_context_complete(&data->ctx, -EIO); adc_context_complete(&data->ctx, -EIO);
return; continue;
} }
} }