summaryrefslogtreecommitdiff
path: root/common/charger.c
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 /common/charger.c
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 'common/charger.c')
-rw-r--r--common/charger.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/charger.c b/common/charger.c
index 0bafba5a10..4037af9854 100644
--- a/common/charger.c
+++ b/common/charger.c
@@ -316,9 +316,8 @@ enum ec_error_list charger_set_mode(int mode)
return rv;
}
-enum ec_error_list charger_enable_otg_power(int enabled)
+enum ec_error_list charger_enable_otg_power(int chgnum, int enabled)
{
- int chgnum = 0;
int rv = EC_ERROR_UNIMPLEMENTED;
if ((chgnum < 0) || (chgnum >= board_get_charger_chip_count())) {
@@ -332,10 +331,10 @@ enum ec_error_list charger_enable_otg_power(int enabled)
return rv;
}
-enum ec_error_list charger_set_otg_current_voltage(int output_current,
+enum ec_error_list charger_set_otg_current_voltage(int chgnum,
+ int output_current,
int output_voltage)
{
- int chgnum = 0;
int rv = EC_ERROR_UNIMPLEMENTED;
if ((chgnum < 0) || (chgnum >= board_get_charger_chip_count())) {