diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-07-14 15:12:30 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-21 01:34:46 +0000 |
commit | e2244743f3b03962d1adb3c49c20a99a0618e4c9 (patch) | |
tree | ca4d074440f695b97621e754618271a5f844c770 /board/waddledee | |
parent | 305e45d19e8aad0531ff22577fd24d5fb26b8865 (diff) | |
download | chrome-ec-e2244743f3b03962d1adb3c49c20a99a0618e4c9.tar.gz |
waddledee: Use VBUS ADC for extpower
There's an issue with the CHG_DET bit which was causing the AC change
notifications to not occur. This commit replaces the usage of the
CHG_DET bit with reading the VBUS ADCs to determine VBUS presence.
BUG=b:161269327
BRANCH=None
TEST=Build and flash waddledee rev 1, verify AC notification changes
work as expected.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Ibebeb4e252efd4ac8bc3d97303eb3c133e699e1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2297983
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/waddledee')
-rw-r--r-- | board/waddledee/board.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/board/waddledee/board.c b/board/waddledee/board.c index 11e48a0a26..c3e6858de6 100644 --- a/board/waddledee/board.c +++ b/board/waddledee/board.c @@ -313,13 +313,7 @@ uint16_t tcpc_get_alert_status(void) int extpower_is_present(void) { - int chg0 = 0; - int chg1 = 0; - - sm5803_get_chg_det(0, &chg0); - sm5803_get_chg_det(1, &chg1); - - return chg0 || chg1; + return sm5803_is_vbus_present(0) || sm5803_is_vbus_present(1); } void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, |