drivers: adc: use adc_read_dt api

Where struct adc_dt_spec is in use use adc_read_dt().

Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
Nick Ward 2023-09-23 09:27:39 +10:00 committed by Carles Cufí
commit ead0c4f865
7 changed files with 14 additions and 14 deletions

View file

@ -28,7 +28,7 @@ static int fetch(const struct device *dev, enum sensor_channel chan)
return -ENOTSUP;
}
ret = adc_read(config->port.dev, &data->sequence);
ret = adc_read_dt(&config->port, &data->sequence);
if (ret != 0) {
LOG_ERR("adc_read: %d", ret);
}

View file

@ -46,7 +46,7 @@ static int fetch(const struct device *dev, enum sensor_channel chan)
return -ENOTSUP;
}
ret = adc_read(config->adc.dev, &data->sequence);
ret = adc_read_dt(&config->adc, &data->sequence);
if (ret != 0) {
LOG_ERR("adc_read: %d", ret);
}