diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-09-25 11:58:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-29 11:24:37 -0700 |
commit | 95c0393a67113cac466888c2c70ffd553bb6f6ee (patch) | |
tree | a994e2feb363af014c7ab0c9b48f8142f86c6f92 /common/vboot | |
parent | 18cbbffe323dbb0c2ae54ca1a3fa25d4928008de (diff) | |
download | chrome-ec-95c0393a67113cac466888c2c70ffd553bb6f6ee.tar.gz |
Fizz: Blink LED to request more power
This patch makes the LED blink to alert the user when there is
not enough power to boot the system.
This patch also changes minimum boot power to 50W. It's common
for all SKUs.
BUG=b:37646390
BRANCH=none
TEST=Power Fizz with 15W, 45W, 60W chargers. Verify LED blinks as
expected.
Change-Id: If269897f5022f6cba80f37ce03e2315cfb2cf504
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/682876
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/vboot')
-rw-r--r-- | common/vboot/vboot.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/vboot/vboot.c b/common/vboot/vboot.c index 4830d34cce..c645d7b4f9 100644 --- a/common/vboot/vboot.c +++ b/common/vboot/vboot.c @@ -149,7 +149,6 @@ static int verify_and_jump(void) /* Request more power: charging battery or more powerful AC adapter */ static void request_power(void) { - /* TODO(crosbug.com/p/37646390): Blink LED */ CPRINTS("%s", __func__); } @@ -192,7 +191,7 @@ static void vboot_main(void) return; } - if (system_get_image_copy() != SYSTEM_IMAGE_RO || !system_is_locked()) { + if (system_is_in_rw() || !system_is_locked()) { /* * If we're here, it means PD negotiation was attempted but * we didn't get enough power to boot AP. This happens on RW @@ -203,6 +202,10 @@ static void vboot_main(void) * also be here because PD negotiation is still taking place. * If so, we'll briefly show request power sign but it will * be immediately corrected. + * + * We can also get here because we called system_can_boot_ap too + * early. Power will be requested but it should be cancelled by + * board_set_charge_limit as soon as a PD contract is made. */ request_power(); return; |