summaryrefslogtreecommitdiff
path: root/board/scarlet
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-08-25 11:13:01 -0600
committerCommit Bot <commit-bot@chromium.org>2020-08-27 17:58:10 +0000
commit40a988f3fa4c259dcba1d2d8fa0ef84c6a867c88 (patch)
tree1587cb39f1ee9bf136454bb68123d86b58b422f1 /board/scarlet
parentffbc66137e4033eccd13a339043efbc24a0e8aab (diff)
downloadchrome-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 'board/scarlet')
-rw-r--r--board/scarlet/usb_pd_policy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/scarlet/usb_pd_policy.c b/board/scarlet/usb_pd_policy.c
index a47c15ebdb..cba4540ecd 100644
--- a/board/scarlet/usb_pd_policy.c
+++ b/board/scarlet/usb_pd_policy.c
@@ -37,7 +37,7 @@ int pd_set_power_supply_ready(int port)
pd_set_vbus_discharge(port, 0);
/* Provide VBUS */
vbus_en = 1;
- charger_enable_otg_power(1);
+ charger_enable_otg_power(CHARGER_SOLO, 1);
/* notify host of power info change */
pd_send_host_event(PD_EVENT_POWER_CHANGE);
@@ -52,7 +52,7 @@ void pd_power_supply_reset(int port)
prev_en = vbus_en;
/* Disable VBUS */
vbus_en = 0;
- charger_enable_otg_power(0);
+ charger_enable_otg_power(CHARGER_SOLO, 0);
/* Enable discharge if we were previously sourcing 5V */
if (prev_en)
pd_set_vbus_discharge(port, 1);