From 57cf15057679a010b3af76e90f6f6159c3a429e6 Mon Sep 17 00:00:00 2001 From: Dawid Niedzwiecki Date: Fri, 19 Mar 2021 09:50:36 +0100 Subject: 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 Change-Id: I6b716e20af18623249a4a972b6f3db8eec09a376 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2775487 Reviewed-by: Wai-Hong Tam Commit-Queue: Wai-Hong Tam --- include/adc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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[]; -- cgit v1.2.1