samus_pd: Allow samus PD MCU to negotiate before battery is detected.

This is a temporary hack to allow PD MCU to negotiate for 20V before
EC tells it that the battery is present. This is currently necessary
because at 5V, we don't have enough power to boot the AP, and we can't
wait to boot the AP until we negotiate because the zinger tends to
get stuck in an infinite reboot loop when the AP is off.

Note that this will need to be removed when we implement PD software
sync because the whole point of that is to not talk to outside world
until we verify our code.

BUG=chrome-os-partner:29840
BRANCH=none
TEST=Tested on samus 2A and 2B boards, made sure system could boot
with and without battery.

Change-Id: I03f319bf81b4e90758132e774848dff5542f4ce5
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/205144
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Duncan Laurie
2014-06-19 18:45:22 +08:00
committed by chrome-internal-fetch
parent 447eafb55a
commit a56f966556

View File

@@ -34,7 +34,7 @@ const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo);
static unsigned max_mv = -1; /* no cap */
/* Flag for battery status */
static int battery_ok;
static int battery_ok = 1;
int pd_choose_voltage(int cnt, uint32_t *src_caps, uint32_t *rdo)
{