diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-03-19 09:50:36 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-22 19:15:00 +0000 |
commit | 57cf15057679a010b3af76e90f6f6159c3a429e6 (patch) | |
tree | fcf503876d155cf12c4178bb9aeb8c92ea592bec /include | |
parent | 8f6efc52ecc3b9089b714231f12316a49be002b8 (diff) | |
download | chrome-ec-57cf15057679a010b3af76e90f6f6159c3a429e6.tar.gz |
zephyr: Add ADC mul and div factors support
Some boards need to adjust ADC measurements with multiplication and
division factors so add support for these also in Zephyr.
BUG=b:175881324
BRANCH=none
TEST=Add mul and div factors in the dts file and verify measurements
with the "adc" console command
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I6b716e20af18623249a4a972b6f3db8eec09a376
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2775487
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/adc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/adc.h b/include/adc.h index 0ed3146635..2ead96f5b3 100644 --- a/include/adc.h +++ b/include/adc.h @@ -25,6 +25,8 @@ enum adc_channel { struct adc_t { const char *name; uint8_t input_ch; + int factor_mul; + int factor_div; }; extern const struct adc_t adc_channels[]; |