samus: prevent fast enable/disable charging loop
samus: prevent fast enable/disable charging loop

Bug fix for the new samus charging software workarounds. The problem
occurs occasionally, especially with 5V chargers, and causes the
new software workarounds to get out of sync with the actualy state
of the charging circuit such that when ACOK actually goes high, we
stop charging, and then when ACOK goes low we start charging, and
we end up in a high frequency loop of enabling/disabling charging.

The fix is to add a 100ms delay when ACOK goes low before allowing
charging again. This guarantees that the circuit will settle down
before we try charging again.

BUG=chrome-os-partner:36081
BRANCH=samus
TEST=can reproduce with an EVT2 samus connected to a DVT samus at
~15% battery. On the DVT samus, allow charging from the other other
samus with charge override. Without this change, most of the time
the PD console goes back and forth between enabling and disabling
charging. With this change, we don't can actually charge briefly,
although there is still a problem where VBUS can dip too low and
cause ACOK to actually go low.

Change-Id: If83def862fb58ef3938e2a443e1a081bd27713ec
Signed-off-by: Alec Berg <1a4429eeda29095a12e19a73405f80f5b7f37a63@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/247460
Reviewed-by: Shawn N <5259333ce42e3ace6a73988cec7115ed9d3a661a@chromium.org>
Reviewed-by: Duncan Laurie <70662b43bc1a20b57ded72a2b08be88dd0da4841@chromium.org>
(cherry picked from commit 911c1821f92bfadc9e0996926ee1b20f7977e562)
Signed-off-by: Alec Berg <1a4429eeda29095a12e19a73405f80f5b7f37a63@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/247454

thehobn/ec,thehobn/ec,thehobn/ec,thehobn/ec