diff options
author | Diana Z <dzigterman@chromium.org> | 2020-01-22 12:07:04 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-28 20:22:26 +0000 |
commit | 1b4ce5849d520b67447bdc5b94e346432eac2126 (patch) | |
tree | a640609b5c024c0020ccb48e121b496fa686f1c2 /include | |
parent | f1e626bf81bc511d713fd306395d00e857764c09 (diff) | |
download | chrome-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 'include')
-rw-r--r-- | include/charger.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/charger.h b/include/charger.h index 6aebf3b94c..2c7a7ce8a8 100644 --- a/include/charger.h +++ b/include/charger.h @@ -82,7 +82,8 @@ struct charger_drv { enum ec_error_list (*discharge_on_ac)(int chgnum, int enable); /* Get the VBUS voltage (mV) from the charger */ - int (*get_vbus_voltage)(int chgnum, int port); + enum ec_error_list (*get_vbus_voltage)(int chgnum, int port, + int *voltage); /* Set desired input current value */ enum ec_error_list (*set_input_current)(int chgnum, int input_current); @@ -214,7 +215,7 @@ enum ec_error_list charger_set_voltage(int voltage); enum ec_error_list charger_discharge_on_ac(int enable); /* Get the VBUS voltage (mV) from the charger */ -int charger_get_vbus_voltage(int port); +enum ec_error_list charger_get_vbus_voltage(int port, int *voltage); /* Custom board function to discharge battery when on AC power */ int board_discharge_on_ac(int enable); |