Skip to content

Commit a48d4df

Browse files
committed
drivers: ctr_batt: Revert ADC workaround
This reverts commit 74bb003.
1 parent 51a388f commit a48d4df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ctr_batt/ctr_batt.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static int ctr_batt_get_rest_voltage_mv_(const struct device *dev, int *rest_mv,
104104

105105
ret = adc_raw_to_millivolts(adc_ref_internal(get_config(dev)->adc_dev),
106106
get_config(dev)->adc_channel_cfg.gain,
107-
get_data(dev)->adc_sequence.resolution - 1, &u);
107+
get_data(dev)->adc_sequence.resolution, &u);
108108
if (ret) {
109109
LOG_ERR("Call `adc_raw_to_millivolts` failed: %d", ret);
110110
return ret;
@@ -189,7 +189,7 @@ static int ctr_batt_get_load_voltage_mv_(const struct device *dev, int *load_mv,
189189

190190
ret = adc_raw_to_millivolts(adc_ref_internal(get_config(dev)->adc_dev),
191191
get_config(dev)->adc_channel_cfg.gain,
192-
get_data(dev)->adc_sequence.resolution - 1, &u);
192+
get_data(dev)->adc_sequence.resolution, &u);
193193
if (ret) {
194194
LOG_ERR("Call `adc_raw_to_millivolts` failed: %d", ret);
195195
return ret;

0 commit comments

Comments
 (0)