diff options
author | Diana Z <dzigterman@chromium.org> | 2020-08-25 11:13:01 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-27 17:58:10 +0000 |
commit | 40a988f3fa4c259dcba1d2d8fa0ef84c6a867c88 (patch) | |
tree | 1587cb39f1ee9bf136454bb68123d86b58b422f1 /baseboard | |
parent | ffbc66137e4033eccd13a339043efbc24a0e8aab (diff) | |
download | chrome-ec-40a988f3fa4c259dcba1d2d8fa0ef84c6a867c88.tar.gz |
Charger: Add chgnum parameter to OTG set functions
Add the charger number as an input for setting OTG output current and
enabling it, both in the charger driver and in
charge_set_output_current_limit(). Also add a clarifying note about the
intent of CHARGER_SOLO.
BRANCH=None
BUG=b:147440290
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I7656c19a87d8216f5efc72dcffa6d638064d3e2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2376469
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/kukui/usb_pd_policy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/baseboard/kukui/usb_pd_policy.c b/baseboard/kukui/usb_pd_policy.c index d56a711dd6..b2ff65b849 100644 --- a/baseboard/kukui/usb_pd_policy.c +++ b/baseboard/kukui/usb_pd_policy.c @@ -57,9 +57,9 @@ int pd_set_power_supply_ready(int port) #endif /* defined(CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT) */ if (IS_ENABLED(VARIANT_KUKUI_CHARGER_ISL9238)) - charge_set_output_current_limit(3300, 5000); + charge_set_output_current_limit(CHARGER_SOLO, 3300, 5000); else - charger_enable_otg_power(1); + charger_enable_otg_power(CHARGER_SOLO, 1); gpio_set_level(GPIO_EN_USBC_CHARGE_L, 1); gpio_set_level(GPIO_EN_PP5000_USBC, 1); @@ -92,9 +92,9 @@ void pd_power_supply_reset(int port) #endif /* defined(CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT) */ if (IS_ENABLED(VARIANT_KUKUI_CHARGER_ISL9238)) - charge_set_output_current_limit(0, 0); + charge_set_output_current_limit(CHARGER_SOLO, 0, 0); else - charger_enable_otg_power(0); + charger_enable_otg_power(CHARGER_SOLO, 0); gpio_set_level(GPIO_EN_PP5000_USBC, 0); |