diff options
author | Yilun Lin <yllin@chromium.org> | 2019-11-11 14:42:34 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-11 09:54:13 +0000 |
commit | 62c9985607287f4994fb6657a65a0075ae54756e (patch) | |
tree | 83af44e39c552ded0a262c21c497e8d3b66c7a6b /board/kukui | |
parent | b6be04071411efc7d22c9b9d0d3fd44242278a04 (diff) | |
download | chrome-ec-62c9985607287f4994fb6657a65a0075ae54756e.tar.gz |
baseboard/kukui: fix pogo extpower status
On krane, POGO provide extpower when only connects to a
dock, so we should check if it's connecting to a dock,
rather than checking POGO_VBUS_PRESENT only.
TEST=see battery LED is off when connects to keyboard, and
LED on when connets to a USB-C charger.
BUG=b:144137508
BRANCH=kukui
Change-Id: Iab38590780b1e86149287fb9985c8ffa625b016f
Signed-off-by: Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1907670
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'board/kukui')
-rw-r--r-- | board/kukui/board.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/board/kukui/board.c b/board/kukui/board.c index 08463539cf..f388dca751 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -217,6 +217,13 @@ int board_discharge_on_ac(int enable) return charger_discharge_on_ac(enable); } +#ifndef VARIANT_KUKUI_POGO_KEYBOARD +int kukui_pogo_extpower_present(void) +{ + return 0; +} +#endif + int extpower_is_present(void) { /* @@ -230,7 +237,7 @@ int extpower_is_present(void) else usb_c_extpower_present = tcpm_get_vbus_level(CHARGE_PORT_USB_C); - return usb_c_extpower_present || gpio_get_level(GPIO_POGO_VBUS_PRESENT); + return usb_c_extpower_present || kukui_pogo_extpower_present(); } int pd_snk_is_vbus_provided(int port) |