summaryrefslogtreecommitdiff
path: root/common/usb_common.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2021-05-17 20:26:39 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-19 20:26:23 +0000
commit848a2cb8c29a8b5ca38c6d83578f78f01e496cd1 (patch)
tree98a65c57ee6f5a9d400c658b70ca498b0300c7e1 /common/usb_common.c
parent48c2e894a960a186a1b19b21ad270d7a2f62ed00 (diff)
downloadchrome-ec-848a2cb8c29a8b5ca38c6d83578f78f01e496cd1.tar.gz
dedede: Rework `extpower_is_present()`
The dedede boards erroneously assumed that if VBUS was present, then "extpower" was present. "extpower" is generally connected to the ACOK signal for the battery charger IC. It indicates that the voltage present at the switching node is valid for bucking or boosting. For our Type-C systems, this needs to be at least 4V. However, just because VBUS is present doesn't mean that the voltage is present at the switching node. The FETs on the selected charge port needs to be enabled first. This commit simply changes the logic to check the battery charger ICs' ACOK status to reflect whether extpower is present. BUG=b:187965740 BRANCH=dedede TEST=Build and flash drawcia and madoo, verify that "AC on" prints are emitted when the charge port is selected and not just when VBUS appears on the port. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: If5a4a10d502f2f08ccf1d3228e42f48fa6d45909 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2901254 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/usb_common.c')
-rw-r--r--common/usb_common.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/common/usb_common.c b/common/usb_common.c
index 2e1030ea9a..4f9e17fa4f 100644
--- a/common/usb_common.c
+++ b/common/usb_common.c
@@ -46,10 +46,6 @@
*/
#define MIN_BATTERY_FOR_PD_UPGRADE_MAH 100 /* mAH */
-__overridable void board_vbus_present_change(void)
-{
-}
-
#if defined(CONFIG_CMD_PD) && defined(CONFIG_CMD_PD_FLASH)
int hex8tou32(char *str, uint32_t *val)
{