summaryrefslogtreecommitdiff
path: root/common/charger.c
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-01-22 12:07:04 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-28 20:22:26 +0000
commit1b4ce5849d520b67447bdc5b94e346432eac2126 (patch)
treea640609b5c024c0020ccb48e121b496fa686f1c2 /common/charger.c
parentf1e626bf81bc511d713fd306395d00e857764c09 (diff)
downloadchrome-ec-1b4ce5849d520b67447bdc5b94e346432eac2126.tar.gz
Charger: change get_vbus_voltage to return EC error
The other driver structure members return an ec_error_list value and fill in parameters to return data. This commit changes the get_vbus_voltage call to follow that model. BRANCH=None BUG=b:147672225 TEST=builds Change-Id: I7308502a9734274dd308b830762493c4d70d147a Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2015340 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/charger.c')
-rw-r--r--common/charger.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/charger.c b/common/charger.c
index e2f6112ed7..0f198b2635 100644
--- a/common/charger.c
+++ b/common/charger.c
@@ -455,7 +455,7 @@ enum ec_error_list charger_discharge_on_ac(int enable)
return rv;
}
-int charger_get_vbus_voltage(int port)
+enum ec_error_list charger_get_vbus_voltage(int port, int *voltage)
{
int chgnum = 0;
int rv = 0;
@@ -466,7 +466,8 @@ int charger_get_vbus_voltage(int port)
}
if (chg_chips[chgnum].drv->get_vbus_voltage)
- rv = chg_chips[chgnum].drv->get_vbus_voltage(chgnum, port);
+ rv = chg_chips[chgnum].drv->get_vbus_voltage(chgnum, port,
+ voltage);
return rv;
}