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>
This commit is contained in:
Philip Chen
2017-08-18 12:17:37 -07:00
committed by chrome-bot
parent 60f8deccb1
commit 8e7bad0482

View File

@@ -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) {