summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2022-11-02 16:55:28 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-03 05:28:31 +0000
commitd8719f53c8b9f02ed1f4f401f93c6ac526f82a03 (patch)
tree24267f64980c01e12ede1bf98d59aa1d66f1467b
parent75f77820cffd3d11143d308ceaf5f61132ae22a5 (diff)
downloadchrome-ec-d8719f53c8b9f02ed1f4f401f93c6ac526f82a03.tar.gz
corsola: update board_set_charge_limit
After https://crrev.com/c/3905352 merged, we enforce 2.5W sink power while VBUS Transition in PD communication. The previous board_set_charge_limit will raise the current_limit to CONFIG_CHARGER_INPUT_CURRENT_LIMIT (512 on corsola), and thus we can't meet the PSNKSTDBY 2.5W. This CL drop the MAX() to ensure the requirement is met. BUG=b:255908917 TEST=input current is not altered to 512mA when VBusTransition BRANCH=corsola Change-Id: I626374d2172958db2d925a8004bf958b94a194d7 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3995635 Commit-Queue: Eric Yilun Lin <yllin@google.com> Code-Coverage: Sung-Chi Li <lschyi@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Code-Coverage: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
-rw-r--r--zephyr/projects/corsola/src/usbc_config.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/zephyr/projects/corsola/src/usbc_config.c b/zephyr/projects/corsola/src/usbc_config.c
index 8bc03991ee..838f676694 100644
--- a/zephyr/projects/corsola/src/usbc_config.c
+++ b/zephyr/projects/corsola/src/usbc_config.c
@@ -126,11 +126,10 @@ __override enum pd_dual_role_states pd_get_drp_state_in_s0(void)
}
}
-void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
- int charge_mv)
+__override void board_set_charge_limit(int port, int supplier, int charge_ma,
+ int max_ma, int charge_mv)
{
- charge_set_input_current_limit(
- MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv);
+ charge_set_input_current_limit(charge_ma, charge_mv);
}
void board_pd_vconn_ctrl(int port, enum usbpd_cc_pin cc_pin, int enabled)