summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2017-08-18 12:17:37 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-21 12:52:13 -0700
commit8e7bad04821fb7b288ab2d3b4e1e3551ee7d6e94 (patch)
treec25426ed6865ea180aa3572856c9e0431233cf0a
parent60f8deccb1de072340c7b624f16149f84db2323b (diff)
downloadchrome-ec-8e7bad04821fb7b288ab2d3b4e1e3551ee7d6e94.tar.gz
battery/max17055: Specify desired charging voltage/current
BUG=b:64821815, b:63870414 CQ-DEPEND=CL:621777 BRANCH=none TEST=plug in AC, and check 'charger' command on ec console Change-Id: Ic60bcab7fd0ccc2ea73471ac46e9b0b887f251d9 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/621776 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--driver/battery/max17055.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/battery/max17055.c b/driver/battery/max17055.c
index 1814fc57ea..beeaa4bc42 100644
--- a/driver/battery/max17055.c
+++ b/driver/battery/max17055.c
@@ -256,8 +256,8 @@ void battery_get_params(struct batt_params *batt)
batt->current = CURRENT_CONV((int16_t)reg);
- /* Default to not desiring voltage and current */
- batt->desired_voltage = batt->desired_current = 0;
+ batt->desired_voltage = battery_get_info()->voltage_max;
+ batt->desired_current = BATTERY_DESIRED_CHARGING_CURRENT;
/* If any of those reads worked, the battery is responsive */
if ((batt->flags & flags_to_check) != flags_to_check) {