summaryrefslogtreecommitdiff
path: root/chip/it83xx/adc_chip.h
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2020-09-22 11:38:17 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-24 09:21:35 +0000
commit5754434287895683c4d197092eb120019ef12116 (patch)
tree58c8ab0b838a59e067575320872eac12b16773f0 /chip/it83xx/adc_chip.h
parent0542741e0e8727ae53bce47a1fd4459735056b53 (diff)
downloadchrome-ec-5754434287895683c4d197092eb120019ef12116.tar.gz
it83xx/adc: adjust ADC read timeout to 1ms.
Voltage comparator has about 73us conversion time, and ADC read channel has about 122 us conversion time. ADC engine will convert each channel at a time (comparators and ADC read channel) and current timeout setting is 248us, so we might have a chance to trigger timeout if converting two comparators while EC starts ADC read channel. This change increased timeout to 1ms. BUG=b:164256608 BRANCH=none TEST=Verified that running 'ectool temps all' without error on drawcia x200. Change-Id: I803d3065a75adaee673a9724ec4fc2fd73da0c48 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2423663 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'chip/it83xx/adc_chip.h')
-rw-r--r--chip/it83xx/adc_chip.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/it83xx/adc_chip.h b/chip/it83xx/adc_chip.h
index f843dca996..23cc68fb34 100644
--- a/chip/it83xx/adc_chip.h
+++ b/chip/it83xx/adc_chip.h
@@ -13,11 +13,11 @@
/*
* Maximum time we allow for an ADC conversion.
* NOTE:
- * This setting must be less than "SLEEP_SET_HTIMER_DELAY_USEC" in clock.c
- * or adding a sleep mask to prevent going in to deep sleep while ADC
+ * Because this setting greater than "SLEEP_SET_HTIMER_DELAY_USEC" in clock.c,
+ * so we enabled sleep mask to prevent going in to deep sleep while ADC
* converting.
*/
-#define ADC_TIMEOUT_US 248
+#define ADC_TIMEOUT_US MSEC
/* Minimum and maximum values returned by adc_read_channel(). */
#define ADC_READ_MIN 0