diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-05-01 14:15:31 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-02 01:14:13 +0000 |
commit | 7fd9b69239127e41de0686291636b4fc4f72d5d9 (patch) | |
tree | 9a7f38e487919da45d6f2429496c026a316ecc93 /common/charge_ramp.c | |
parent | b2a18a49fecd0081f7ebba00c489d07262ec58d6 (diff) | |
download | chrome-ec-7fd9b69239127e41de0686291636b4fc4f72d5d9.tar.gz |
charge_ramp: fix flaky charge_ramp test
Fix flaky charge_ramp test. The test often delays CHARGE_DETECT_DELAY
after a new charger has been plugged in. But, that is the same delay
the charge_ramp module uses before starting to ramp. This creates a
race condition where sometimes the test resumes before the ramp up
starts and sometimes the test resumes after the ramp up starts. This
change fixes the problem by modifying the test to delay by 100ms
less than the charge_ramp module.
BUG=chromium:483543
BRANCH=none
TEST=run charge_ramp test 10 times w/o this CL and see failure 4
times. run test 20 times with this CL and observe 0 failures.
Change-Id: I5f7a6a05f9293d3dd7db5517a9df7caec95c58ea
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/268798
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/charge_ramp.c')
-rw-r--r-- | common/charge_ramp.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/common/charge_ramp.c b/common/charge_ramp.c index f2a2c8bf51..059648a88b 100644 --- a/common/charge_ramp.c +++ b/common/charge_ramp.c @@ -21,12 +21,6 @@ /* Number of times to ramp current searching for limit before stable charging */ #define RAMP_COUNT 3 -/* - * Time to delay for detecting the charger type (must be long enough for BC1.2 - * driver to get supplier information and notify charge manager). - */ -#define CHARGE_DETECT_DELAY (2*SECOND) - /* Maximum allowable time charger can be unplugged to be considered an OCP */ #define OC_RECOVER_MAX_TIME (SECOND) |