diff options
author | Ting Shen <phoenixshen@google.com> | 2021-09-01 16:30:40 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-01 14:55:02 +0000 |
commit | e46c833295e213e5fa9daa7dd84c9c0f27b60706 (patch) | |
tree | 9950cc2372ba53886f544c33b470c86e334146f5 | |
parent | a53532edbf795de28a66e558abd431a3832cfa57 (diff) | |
download | chrome-ec-e46c833295e213e5fa9daa7dd84c9c0f27b60706.tar.gz |
cherry: Don't return error when disabling all charge ports
The line RETURN_ERROR(rt1718s_gpio_ctrl(...)) caused EC not able to turn
on sink path on C0 when daughter board absent.
To make C0 workable under this situation, ignore the error and print
some error message instead like other boards do.
BUG=b:198114418
BRANCH=none
TEST=device charging when daughter board not connected
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I09941310370a60be6145e38395a4922df52c2b9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3135516
Tested-by: Ting Shen <phoenixshen@chromium.org>
Auto-Submit: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
-rw-r--r-- | baseboard/cherry/baseboard.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/baseboard/cherry/baseboard.c b/baseboard/cherry/baseboard.c index 36f6adb1f8..c5eaad56ab 100644 --- a/baseboard/cherry/baseboard.c +++ b/baseboard/cherry/baseboard.c @@ -557,7 +557,8 @@ int board_set_active_charge_port(int port) if (port == 1) RETURN_ERROR(rt1718s_gpio_ctrl(RT1718S_GPIO_ENABLE_SINK)); else if (port != 1 && !ppc_is_sourcing_vbus(1)) - RETURN_ERROR(rt1718s_gpio_ctrl(RT1718S_GPIO_DISABLED)); + /* error ignored to make port 0 work without sub-board */ + rt1718s_gpio_ctrl(RT1718S_GPIO_DISABLED); return EC_SUCCESS; } |