Skip to content

Commit

Permalink
drivers: sensor: voltage_divider: revert patch
Browse files Browse the repository at this point in the history
A patch was added to the voltage divider to handle an erroneous
negative voltage reading for the nrfx_saadc which could return
negative voltages even though the ADC mode was single ended.

This has now been patched in the ADC driver.

(cherry picked from commit ee69e9f)

Original-Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
GitOrigin-RevId: ee69e9f
Change-Id: I6b86ff7b5edba0c9ff462c31556a11eb0a94774b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5705490
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
  • Loading branch information
bjarki-andreasen authored and Chromeos LUCI committed Jul 15, 2024
1 parent 8b00dce commit 3a3399e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/sensor/voltage_divider/voltage.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ static int get(const struct device *dev, enum sensor_channel chan, struct sensor

if (config->voltage.port.channel_cfg.differential) {
raw_val = (int16_t)data->raw;
} else if (config->voltage.port.resolution < 16) {
/* Can be removed when issue #71119 is resolved */
raw_val = (int16_t)data->raw;
} else {
raw_val = data->raw;
}
Expand Down

0 comments on commit 3a3399e

Please sign in to comment.