summaryrefslogtreecommitdiff
path: root/driver/charger/bd9995x.c
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2020-12-01 17:06:56 +0800
committerCommit Bot <commit-bot@chromium.org>2020-12-08 06:28:52 +0000
commitdd1942af2d0b308e0b2d6210bfabeadb053101da (patch)
tree17569960b331afe0e73585caaab638e930ebeedd /driver/charger/bd9995x.c
parent7ae129c1f3cd76722902da6582825f53e4aff344 (diff)
downloadchrome-ec-dd1942af2d0b308e0b2d6210bfabeadb053101da.tar.gz
charger: replace charger_get_input_current uses
Replace them with charger_get_input_current_limit which is aligned to the old usage, no funcional changes. Keep OCPC charger_get_input_current uses as was, since it is its intended use. Also, implement - isl923x_get_input_current, raa48900_get_input_current - sm5803_get_input_current_limit BUG=b:171853295 TEST=1. grep "\<charger_get_input_current\>"; only ocpc uses the function. 2. make buildall 3. test with CL:2569086 on waddledee(sm5803), waddledoo(raa489000), hayato(isl923x), pompom(isl923x), and ensure the output of `curr 0|1` equalts to the report of power meter. BRANCH=none Change-Id: I71aca33cbc88dda9b0238cb71b1609665a9c9a7f Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569085 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'driver/charger/bd9995x.c')
-rw-r--r--driver/charger/bd9995x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c
index b38776a574..6fd79b8d8f 100644
--- a/driver/charger/bd9995x.c
+++ b/driver/charger/bd9995x.c
@@ -634,8 +634,8 @@ static enum ec_error_list bd9995x_set_input_current_limit(int chgnum,
BD9995X_BAT_CHG_COMMAND);
}
-static enum ec_error_list bd9995x_get_input_current(int chgnum,
- int *input_current)
+static enum ec_error_list bd9995x_get_input_current_limit(int chgnum,
+ int *input_current)
{
return ch_raw_read16(chgnum, BD9995X_CMD_CUR_ILIM_VAL, input_current,
BD9995X_EXTENDED_COMMAND);
@@ -1732,7 +1732,7 @@ const struct charger_drv bd9995x_drv = {
.discharge_on_ac = &bd9995x_discharge_on_ac,
.get_vbus_voltage = &bd9995x_get_vbus_voltage,
.set_input_current_limit = &bd9995x_set_input_current_limit,
- .get_input_current = &bd9995x_get_input_current,
+ .get_input_current_limit = &bd9995x_get_input_current_limit,
.manufacturer_id = &bd9995x_manufacturer_id,
.device_id = &bd9995x_device_id,
.get_option = &bd9995x_get_option,