diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-08-20 09:11:20 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-08-22 01:03:19 +0000 |
commit | 08081ee2dc05fe08cadd19252f94db06664f1cc9 (patch) | |
tree | c1d07b7eb1bfc4a10bacfc82a8ab5bfb4ab3ef6c /common | |
parent | 3e844ec271fa69e2153408cf17aabfacf9723db1 (diff) | |
download | chrome-ec-08081ee2dc05fe08cadd19252f94db06664f1cc9.tar.gz |
zinger: always disable adc watchdog before reading ADC channel
This fixes a bug where we were reading the CC line ADC without disabling
the adc watchdog, which caused misreads. Instead, I changed adc_read_channel
so that every ADC read disables and restores the ADC watchdog.
BUG=chrome-os-partner:31454
BRANCH=none
TEST=tested on EVT zinger. Added debug code to print out CC line voltage
after reading it in usb_pd_protocol.c. Before the change the CC voltage is
mostly wrong, unless you read the ADC twice back to back and look at the
second read value. After this change, the CC voltage ADC reading always
matches the real voltage.
Change-Id: I9d3aa02b3d22defb9cf6f5a866de2b846a6b8a35
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213253
Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions