Files
OpenCellular/driver
Philip Chen a4621c5e64 charger/rt946x: Limit ADC timeout to 50ms
In practice, ADC conversion rarely takes more than 35ms.
However, according to the datasheet, ADC conversion may take
up to 200ms. But we can't wait for that long, otherwise
host command would time out. So here we set ADC timeout as
50ms. If ADC times out, we just return the last read vbus_mv.

BUG=b:70641844, chromium:780364
BRANCH=scarlet
TEST=test 'ectool usbpdpower' for 50k cycles
w/o seeing host command timeout

Change-Id: I09c3abf729e96b113f7a0f64a67cd35906da9e3e
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/956900
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
2018-03-09 20:05:18 -08:00
..
2018-03-02 22:22:34 -08:00
2018-02-09 16:07:10 -08:00
2018-03-09 20:05:06 -08:00
2018-03-09 20:05:06 -08:00
2018-03-09 20:05:06 -08:00
2018-03-09 20:05:06 -08:00
2017-07-13 15:08:42 -07:00
2018-03-02 22:22:34 -08:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2017-02-13 21:15:16 -08:00
2017-02-13 21:15:16 -08:00
2017-10-31 21:49:24 -07:00
2017-10-31 21:49:24 -07:00
2016-08-24 17:40:52 -07:00