summaryrefslogtreecommitdiff
path: root/common/charger.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 /common/charger.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 'common/charger.c')
-rw-r--r--common/charger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/charger.c b/common/charger.c
index 45ffafdec3..6e54f2289d 100644
--- a/common/charger.c
+++ b/common/charger.c
@@ -111,7 +111,7 @@ void charger_get_params(struct charger_params *chg)
if (charger_get_voltage(chgnum, &chg->voltage))
chg->flags |= CHG_FLAG_BAD_VOLTAGE;
- if (charger_get_input_current(chgnum, &chg->input_current))
+ if (charger_get_input_current_limit(chgnum, &chg->input_current))
chg->flags |= CHG_FLAG_BAD_INPUT_CURRENT;
if (charger_get_status(&chg->status))
@@ -172,7 +172,7 @@ void print_charger_debug(int chgnum)
/* input current limit */
print_item_name("I_in:");
- if (check_print_error(charger_get_input_current(chgnum, &d)))
+ if (check_print_error(charger_get_input_current_limit(chgnum, &d)))
ccprintf("%5d (%4d - %5d, %3d)\n", d, info->input_current_min,
info->input_current_max, info->input_current_step);