summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam McNally <sammc@chromium.org>2020-01-30 21:14:06 +1100
committerCommit Bot <commit-bot@chromium.org>2020-01-31 04:05:12 +0000
commitcec65433cd9292af9b38e2c3e7b2377ca2cdaef5 (patch)
tree5b7c4404c254136fd98012b62bd7db66a2b84f90
parentdbb8bb2d7e71a5b6cb3aa71e3f324a576f6c9a5f (diff)
downloadchrome-ec-cec65433cd9292af9b38e2c3e7b2377ca2cdaef5.tar.gz
puff: Fix a typo in the VBUS ADC config.
Matching the SNS_PP3300 entry, the |factor_div| field should multiply by the voltage divider numerator rather than divide. BRANCH=none BUG=b:148634825 TEST=make buildall; ectool usbpdpower reports correct voltage Change-Id: I1dd654229f027852ca818410d4883bd4daab55ae Signed-off-by: Sam McNally <sammc@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2032544 Commit-Queue: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
-rw-r--r--board/puff/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/puff/board.c b/board/puff/board.c
index cf38b5d43d..ab7f2968c2 100644
--- a/board/puff/board.c
+++ b/board/puff/board.c
@@ -284,7 +284,7 @@ const struct adc_t adc_channels[] = {
.name = "VBUS",
.input_ch = NPCX_ADC_CH4,
.factor_mul = ADC_MAX_VOLT * 39,
- .factor_div = (ADC_READ_MAX + 1) / 5,
+ .factor_div = (ADC_READ_MAX + 1) * 5,
},
[ADC_PPVAR_IMON] = { /* 500 mV/A */
.name = "PPVAR_IMON",